﻿/*! For license information please see common.9b49b8bbd5c7f005a6d8.js.LICENSE.txt */
(self.webpackChunkvk=self.webpackChunkvk||[]).push([[68592],{306610:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{default:()=>r})},5991:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{default:()=>o})},896156:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{default:()=>r})},190484:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{default:()=>r})},989188:(e,t,n)=>{"use strict";n.d(t,{popperGenerator:()=>p});var r=n(726143),o=n(140583),i=n(407994),a=n(221955),s=n(50380),c=n(298293),l=n(300003),u=n(162556),d={placement:"bottom",modifiers:[],strategy:"absolute"};function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function p(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,p=void 0===n?[]:n,h=t.defaultOptions,f=void 0===h?d:h;return function(e,t,n){void 0===n&&(n=f);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},d,f),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},m=[],v=!1,g={state:h,setOptions:function(n){y(),h.options=Object.assign({},f,h.options,n),h.scrollParents={reference:(0,u.isElement)(e)?(0,i.default)(e):e.contextElement?(0,i.default)(e.contextElement):[],popper:(0,i.default)(t)};var r=(0,s.default)((0,l.default)([].concat(p,h.options.modifiers)));return h.orderedModifiers=r.filter((function(e){return e.enabled})),h.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:h,name:t,instance:g,options:r}),a=function(){};m.push(i||a)}})),g.update()},forceUpdate:function(){if(!v){var e=h.elements,t=e.reference,n=e.popper;if(_(t,n)){h.rects={reference:(0,r.default)(t,(0,a.default)(n),"fixed"===h.options.strategy),popper:(0,o.default)(n)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach((function(e){return h.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<h.orderedModifiers.length;i++)if(!0!==h.reset){var s=h.orderedModifiers[i],c=s.fn,l=s.options,u=void 0===l?{}:l,d=s.name;"function"==typeof c&&(h=c({state:h,options:u,name:d,instance:g})||h)}else h.reset=!1,i=-1}}},update:(0,c.default)((function(){return new Promise((function(e){g.forceUpdate(),e(h)}))})),destroy:function(){y(),v=!0}};if(!_(e,t))return g;function y(){m.forEach((function(e){return e()})),m=[]}return g.setOptions(n).then((function(e){!v&&n.onFirstUpdate&&n.onFirstUpdate(e)})),g}}},994985:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(162556);function o(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&(0,r.isShadowRoot)(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}},850400:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(162556),o=Math.round;function i(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),i=1,a=1;return(0,r.isHTMLElement)(e)&&t&&(i=n.width/e.offsetWidth||1,a=n.height/e.offsetHeight||1),{width:o(n.width/i),height:o(n.height/a),top:o(n.top/a),right:o(n.right/i),bottom:o(n.bottom/a),left:o(n.left/i),x:o(n.left/i),y:o(n.top/a)}}},621437:(e,t,n)=>{"use strict";n.d(t,{default:()=>g});var r=n(387701),o=n(703155),i=n(127723),a=n(407994),s=n(221955),c=n(467252),l=n(443062),u=n(162556),d=n(850400),_=n(695923),p=n(994985),h=n(96333),f=n(765626),m=n(600138);function v(e,t){return t===r.viewport?(0,f.default)((0,o.default)(e)):(0,u.isHTMLElement)(t)?function(e){var t=(0,d.default)(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):(0,f.default)((0,i.default)((0,c.default)(e)))}function g(e,t,n){var r="clippingParents"===t?function(e){var t=(0,a.default)((0,_.default)(e)),n=["absolute","fixed"].indexOf((0,l.default)(e).position)>=0&&(0,u.isHTMLElement)(e)?(0,s.default)(e):e;return(0,u.isElement)(n)?t.filter((function(e){return(0,u.isElement)(e)&&(0,p.default)(e,n)&&"body"!==(0,h.default)(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],c=o.reduce((function(t,n){var r=v(e,n);return t.top=(0,m.max)(r.top,t.top),t.right=(0,m.min)(r.right,t.right),t.bottom=(0,m.min)(r.bottom,t.bottom),t.left=(0,m.max)(r.left,t.left),t}),v(e,i));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}},726143:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(850400),o=n(264782),i=n(96333),a=n(162556),s=n(504063),c=n(467252),l=n(860611);function u(e,t,n){void 0===n&&(n=!1);var u=(0,a.isHTMLElement)(t),d=(0,a.isHTMLElement)(t)&&function(e){var t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return 1!==n||1!==r}(t),_=(0,c.default)(t),p=(0,r.default)(e,d),h={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(u||!u&&!n)&&(("body"!==(0,i.default)(t)||(0,l.default)(_))&&(h=(0,o.default)(t)),(0,a.isHTMLElement)(t)?((f=(0,r.default)(t,!0)).x+=t.clientLeft,f.y+=t.clientTop):_&&(f.x=(0,s.default)(_))),{x:p.left+h.scrollLeft-f.x,y:p.top+h.scrollTop-f.y,width:p.width,height:p.height}}},443062:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(762057);function o(e){return(0,r.default)(e).getComputedStyle(e)}},467252:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(162556);function o(e){return(((0,r.isElement)(e)?e.ownerDocument:e.document)||window.document).documentElement}},127723:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var r=n(467252),o=n(443062),i=n(504063),a=n(182163),s=n(600138);function c(e){var t,n=(0,r.default)(e),c=(0,a.default)(e),l=null==(t=e.ownerDocument)?void 0:t.body,u=(0,s.max)(n.scrollWidth,n.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),d=(0,s.max)(n.scrollHeight,n.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),_=-c.scrollLeft+(0,i.default)(e),p=-c.scrollTop;return"rtl"===(0,o.default)(l||n).direction&&(_+=(0,s.max)(n.clientWidth,l?l.clientWidth:0)-u),{width:u,height:d,x:_,y:p}}},118328:(e,t,n)=>{"use strict";function r(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}n.d(t,{default:()=>r})},140583:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(850400);function o(e){var t=(0,r.default)(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}},96333:(e,t,n)=>{"use strict";function r(e){return e?(e.nodeName||"").toLowerCase():null}n.d(t,{default:()=>r})},264782:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(182163),o=n(762057),i=n(162556),a=n(118328);function s(e){return e!==(0,o.default)(e)&&(0,i.isHTMLElement)(e)?(0,a.default)(e):(0,r.default)(e)}},221955:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(762057),o=n(96333),i=n(443062),a=n(162556),s=n(767313),c=n(695923);function l(e){return(0,a.isHTMLElement)(e)&&"fixed"!==(0,i.default)(e).position?e.offsetParent:null}function u(e){for(var t=(0,r.default)(e),n=l(e);n&&(0,s.default)(n)&&"static"===(0,i.default)(n).position;)n=l(n);return n&&("html"===(0,o.default)(n)||"body"===(0,o.default)(n)&&"static"===(0,i.default)(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&(0,a.isHTMLElement)(e)&&"fixed"===(0,i.default)(e).position)return null;for(var n=(0,c.default)(e);(0,a.isHTMLElement)(n)&&["html","body"].indexOf((0,o.default)(n))<0;){var r=(0,i.default)(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}},695923:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var r=n(96333),o=n(467252),i=n(162556);function a(e){return"html"===(0,r.default)(e)?e:e.assignedSlot||e.parentNode||((0,i.isShadowRoot)(e)?e.host:null)||(0,o.default)(e)}},97523:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(695923),o=n(860611),i=n(96333),a=n(162556);function s(e){return["html","body","#document"].indexOf((0,i.default)(e))>=0?e.ownerDocument.body:(0,a.isHTMLElement)(e)&&(0,o.default)(e)?e:s((0,r.default)(e))}},703155:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var r=n(762057),o=n(467252),i=n(504063);function a(e){var t=(0,r.default)(e),n=(0,o.default)(e),a=t.visualViewport,s=n.clientWidth,c=n.clientHeight,l=0,u=0;return a&&(s=a.width,c=a.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=a.offsetLeft,u=a.offsetTop)),{width:s,height:c,x:l+(0,i.default)(e),y:u}}},762057:(e,t,n)=>{"use strict";function r(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}n.d(t,{default:()=>r})},182163:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(762057);function o(e){var t=(0,r.default)(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}},504063:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var r=n(850400),o=n(467252),i=n(182163);function a(e){return(0,r.default)((0,o.default)(e)).left+(0,i.default)(e).scrollLeft}},162556:(e,t,n)=>{"use strict";n.d(t,{isElement:()=>o,isHTMLElement:()=>i,isShadowRoot:()=>a});var r=n(762057);function o(e){return e instanceof(0,r.default)(e).Element||e instanceof Element}function i(e){return e instanceof(0,r.default)(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof(0,r.default)(e).ShadowRoot||e instanceof ShadowRoot)}},860611:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(443062);function o(e){var t=(0,r.default)(e),n=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+o)}},767313:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(96333);function o(e){return["table","td","th"].indexOf((0,r.default)(e))>=0}},407994:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(97523),o=n(695923),i=n(762057),a=n(860611);function s(e,t){var n;void 0===t&&(t=[]);var c=(0,r.default)(e),l=c===(null==(n=e.ownerDocument)?void 0:n.body),u=(0,i.default)(c),d=l?[u].concat(u.visualViewport||[],(0,a.default)(c)?c:[]):c,_=t.concat(d);return l?_:_.concat(s((0,o.default)(d)))}},387701:(e,t,n)=>{"use strict";n.d(t,{top:()=>r,bottom:()=>o,right:()=>i,left:()=>a,auto:()=>s,basePlacements:()=>c,start:()=>l,end:()=>u,clippingParents:()=>d,viewport:()=>_,popper:()=>p,reference:()=>h,variationPlacements:()=>f,placements:()=>m,modifierPhases:()=>v});var r="top",o="bottom",i="right",a="left",s="auto",c=[r,o,i,a],l="start",u="end",d="clippingParents",_="viewport",p="popper",h="reference",f=c.reduce((function(e,t){return e.concat([t+"-"+l,t+"-"+u])}),[]),m=[].concat(c,[s]).reduce((function(e,t){return e.concat([t,t+"-"+l,t+"-"+u])}),[]),v=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"]},817824:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(96333),o=n(162556);const i={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},a=t.elements[e];(0,o.isHTMLElement)(a)&&(0,r.default)(a)&&(Object.assign(a.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],a=t.attributes[e]||{},s=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});(0,o.isHTMLElement)(i)&&(0,r.default)(i)&&(Object.assign(i.style,s),Object.keys(a).forEach((function(e){i.removeAttribute(e)})))}))}},requires:["computeStyles"]}},666896:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(506206),o=n(140583),i=n(994985),a=n(221955),s=n(811516),c=n(557516),l=n(563293),u=n(133706),d=n(387701);const _={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,_=e.options,p=n.elements.arrow,h=n.modifiersData.popperOffsets,f=(0,r.default)(n.placement),m=(0,s.default)(f),v=[d.left,d.right].indexOf(f)>=0?"height":"width";if(p&&h){var g=function(e,t){return e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e,(0,l.default)("number"!=typeof e?e:(0,u.default)(e,d.basePlacements))}(_.padding,n),y=(0,o.default)(p),E="y"===m?d.top:d.left,w="y"===m?d.bottom:d.right,b=n.rects.reference[v]+n.rects.reference[m]-h[m]-n.rects.popper[v],C=h[m]-n.rects.reference[m],S=(0,a.default)(p),T=S?"y"===m?S.clientHeight||0:S.clientWidth||0:0,A=b/2-C/2,D=g[E],P=T-y[v]-g[w],O=T/2-y[v]/2+A,I=(0,c.default)(D,O,P),k=m;n.modifiersData[i]=((t={})[k]=I,t.centerOffset=I-O,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&(0,i.default)(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},936531:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(387701),o=n(221955),i=n(762057),a=n(467252),s=n(443062),c=n(506206),l=n(600138),u={top:"auto",right:"auto",bottom:"auto",left:"auto"};function d(e){var t,n=e.popper,c=e.popperRect,d=e.placement,_=e.offsets,p=e.position,h=e.gpuAcceleration,f=e.adaptive,m=e.roundOffsets,v=!0===m?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:(0,l.round)((0,l.round)(t*r)/r)||0,y:(0,l.round)((0,l.round)(n*r)/r)||0}}(_):"function"==typeof m?m(_):_,g=v.x,y=void 0===g?0:g,E=v.y,w=void 0===E?0:E,b=_.hasOwnProperty("x"),C=_.hasOwnProperty("y"),S=r.left,T=r.top,A=window;if(f){var D=(0,o.default)(n),P="clientHeight",O="clientWidth";D===(0,i.default)(n)&&(D=(0,a.default)(n),"static"!==(0,s.default)(D).position&&(P="scrollHeight",O="scrollWidth")),D=D,d===r.top&&(T=r.bottom,w-=D[P]-c.height,w*=h?1:-1),d===r.left&&(S=r.right,y-=D[O]-c.width,y*=h?1:-1)}var I,k=Object.assign({position:p},f&&u);return h?Object.assign({},k,((I={})[T]=C?"0":"",I[S]=b?"0":"",I.transform=(A.devicePixelRatio||1)<2?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",I)):Object.assign({},k,((t={})[T]=C?w+"px":"",t[S]=b?y+"px":"",t.transform="",t))}const _={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,u={placement:(0,c.default)(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,d(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,d(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}}},982372:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(762057),o={passive:!0};const i={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,a=i.scroll,s=void 0===a||a,c=i.resize,l=void 0===c||c,u=(0,r.default)(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&d.forEach((function(e){e.addEventListener("scroll",n.update,o)})),l&&u.addEventListener("resize",n.update,o),function(){s&&d.forEach((function(e){e.removeEventListener("scroll",n.update,o)})),l&&u.removeEventListener("resize",n.update,o)}},data:{}}},804927:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(530697),o=n(506206),i=n(30483),a=n(123161),s=n(86413),c=n(387701),l=n(414943);const u={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,u=e.name;if(!t.modifiersData[u]._skip){for(var d=n.mainAxis,_=void 0===d||d,p=n.altAxis,h=void 0===p||p,f=n.fallbackPlacements,m=n.padding,v=n.boundary,g=n.rootBoundary,y=n.altBoundary,E=n.flipVariations,w=void 0===E||E,b=n.allowedAutoPlacements,C=t.options.placement,S=(0,o.default)(C),T=f||(S===C||!w?[(0,r.default)(C)]:function(e){if((0,o.default)(e)===c.auto)return[];var t=(0,r.default)(e);return[(0,i.default)(e),t,(0,i.default)(t)]}(C)),A=[C].concat(T).reduce((function(e,n){return e.concat((0,o.default)(n)===c.auto?(0,s.default)(t,{placement:n,boundary:v,rootBoundary:g,padding:m,flipVariations:w,allowedAutoPlacements:b}):n)}),[]),D=t.rects.reference,P=t.rects.popper,O=new Map,I=!0,k=A[0],R=0;R<A.length;R++){var M=A[R],L=(0,o.default)(M),x=(0,l.default)(M)===c.start,N=[c.top,c.bottom].indexOf(L)>=0,B=N?"width":"height",U=(0,a.default)(t,{placement:M,boundary:v,rootBoundary:g,altBoundary:y,padding:m}),F=N?x?c.right:c.left:x?c.bottom:c.top;D[B]>P[B]&&(F=(0,r.default)(F));var W=(0,r.default)(F),V=[];if(_&&V.push(U[L]<=0),h&&V.push(U[F]<=0,U[W]<=0),V.every((function(e){return e}))){k=M,I=!1;break}O.set(M,V)}if(I)for(var H=function(e){var t=A.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},j=w?3:1;j>0;j--){if("break"===H(j))break}t.placement!==k&&(t.modifiersData[u]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}}},919892:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(387701),o=n(123161);function i(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function a(e){return[r.top,r.right,r.bottom,r.left].some((function(t){return e[t]>=0}))}const s={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,s=t.rects.popper,c=t.modifiersData.preventOverflow,l=(0,o.default)(t,{elementContext:"reference"}),u=(0,o.default)(t,{altBoundary:!0}),d=i(l,r),_=i(u,s,c),p=a(d),h=a(_);t.modifiersData[n]={referenceClippingOffsets:d,popperEscapeOffsets:_,isReferenceHidden:p,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}}},382122:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(506206),o=n(387701);const i={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,a=n.offset,s=void 0===a?[0,0]:a,c=o.placements.reduce((function(e,n){return e[n]=function(e,t,n){var i=(0,r.default)(e),a=[o.left,o.top].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},t,{placement:e})):n,c=s[0],l=s[1];return c=c||0,l=(l||0)*a,[o.left,o.right].indexOf(i)>=0?{x:l,y:c}:{x:c,y:l}}(n,t.rects,s),e}),{}),l=c[t.placement],u=l.x,d=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=c}}},977421:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(472581);const o={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=(0,r.default)({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}}},205219:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(387701),o=n(506206),i=n(811516),a=n(373967),s=n(557516),c=n(140583),l=n(221955),u=n(123161),d=n(414943),_=n(823607),p=n(600138);const h={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,h=e.name,f=n.mainAxis,m=void 0===f||f,v=n.altAxis,g=void 0!==v&&v,y=n.boundary,E=n.rootBoundary,w=n.altBoundary,b=n.padding,C=n.tether,S=void 0===C||C,T=n.tetherOffset,A=void 0===T?0:T,D=(0,u.default)(t,{boundary:y,rootBoundary:E,padding:b,altBoundary:w}),P=(0,o.default)(t.placement),O=(0,d.default)(t.placement),I=!O,k=(0,i.default)(P),R=(0,a.default)(k),M=t.modifiersData.popperOffsets,L=t.rects.reference,x=t.rects.popper,N="function"==typeof A?A(Object.assign({},t.rects,{placement:t.placement})):A,B={x:0,y:0};if(M){if(m||g){var U="y"===k?r.top:r.left,F="y"===k?r.bottom:r.right,W="y"===k?"height":"width",V=M[k],H=M[k]+D[U],j=M[k]-D[F],K=S?-x[W]/2:0,z=O===r.start?L[W]:x[W],G=O===r.start?-x[W]:-L[W],q=t.elements.arrow,Y=S&&q?(0,c.default)(q):{width:0,height:0},$=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,_.default)(),X=$[U],Q=$[F],J=(0,s.default)(0,L[W],Y[W]),Z=I?L[W]/2-K-J-X-N:z-J-X-N,ee=I?-L[W]/2+K+J+Q+N:G+J+Q+N,te=t.elements.arrow&&(0,l.default)(t.elements.arrow),ne=te?"y"===k?te.clientTop||0:te.clientLeft||0:0,re=t.modifiersData.offset?t.modifiersData.offset[t.placement][k]:0,oe=M[k]+Z-re-ne,ie=M[k]+ee-re;if(m){var ae=(0,s.default)(S?(0,p.min)(H,oe):H,V,S?(0,p.max)(j,ie):j);M[k]=ae,B[k]=ae-V}if(g){var se="x"===k?r.top:r.left,ce="x"===k?r.bottom:r.right,le=M[R],ue=le+D[se],de=le-D[ce],_e=(0,s.default)(S?(0,p.min)(ue,oe):ue,le,S?(0,p.max)(de,ie):de);M[R]=_e,B[R]=_e-le}}t.modifiersData[h]=B}},requiresIfExists:["offset"]}},220804:(e,t,n)=>{"use strict";n.d(t,{createPopper:()=>h});var r=n(989188),o=n(982372),i=n(977421),a=n(936531),s=n(817824),c=n(382122),l=n(804927),u=n(205219),d=n(666896),_=n(919892),p=[o.default,i.default,a.default,s.default,c.default,l.default,u.default,d.default,_.default],h=(0,r.popperGenerator)({defaultModifiers:p})},86413:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(414943),o=n(387701),i=n(123161),a=n(506206);function s(e,t){void 0===t&&(t={});var n=t,s=n.placement,c=n.boundary,l=n.rootBoundary,u=n.padding,d=n.flipVariations,_=n.allowedAutoPlacements,p=void 0===_?o.placements:_,h=(0,r.default)(s),f=h?d?o.variationPlacements:o.variationPlacements.filter((function(e){return(0,r.default)(e)===h})):o.basePlacements,m=f.filter((function(e){return p.indexOf(e)>=0}));0===m.length&&(m=f);var v=m.reduce((function(t,n){return t[n]=(0,i.default)(e,{placement:n,boundary:c,rootBoundary:l,padding:u})[(0,a.default)(n)],t}),{});return Object.keys(v).sort((function(e,t){return v[e]-v[t]}))}},472581:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(506206),o=n(414943),i=n(811516),a=n(387701);function s(e){var t,n=e.reference,s=e.element,c=e.placement,l=c?(0,r.default)(c):null,u=c?(0,o.default)(c):null,d=n.x+n.width/2-s.width/2,_=n.y+n.height/2-s.height/2;switch(l){case a.top:t={x:d,y:n.y-s.height};break;case a.bottom:t={x:d,y:n.y+n.height};break;case a.right:t={x:n.x+n.width,y:_};break;case a.left:t={x:n.x-s.width,y:_};break;default:t={x:n.x,y:n.y}}var p=l?(0,i.default)(l):null;if(null!=p){var h="y"===p?"height":"width";switch(u){case a.start:t[p]=t[p]-(n[h]/2-s[h]/2);break;case a.end:t[p]=t[p]+(n[h]/2-s[h]/2)}}return t}},298293:(e,t,n)=>{"use strict";function r(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}n.d(t,{default:()=>r})},123161:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(850400),o=n(621437),i=n(467252),a=n(472581),s=n(765626),c=n(387701),l=n(162556),u=n(563293),d=n(133706);function _(e,t){void 0===t&&(t={});var n=t,_=n.placement,p=void 0===_?e.placement:_,h=n.boundary,f=void 0===h?c.clippingParents:h,m=n.rootBoundary,v=void 0===m?c.viewport:m,g=n.elementContext,y=void 0===g?c.popper:g,E=n.altBoundary,w=void 0!==E&&E,b=n.padding,C=void 0===b?0:b,S=(0,u.default)("number"!=typeof C?C:(0,d.default)(C,c.basePlacements)),T=y===c.popper?c.reference:c.popper,A=e.elements.reference,D=e.rects.popper,P=e.elements[w?T:y],O=(0,o.default)((0,l.isElement)(P)?P:P.contextElement||(0,i.default)(e.elements.popper),f,v),I=(0,r.default)(A),k=(0,a.default)({reference:I,element:D,strategy:"absolute",placement:p}),R=(0,s.default)(Object.assign({},D,k)),M=y===c.popper?R:I,L={top:O.top-M.top+S.top,bottom:M.bottom-O.bottom+S.bottom,left:O.left-M.left+S.left,right:M.right-O.right+S.right},x=e.modifiersData.offset;if(y===c.popper&&x){var N=x[p];Object.keys(L).forEach((function(e){var t=[c.right,c.bottom].indexOf(e)>=0?1:-1,n=[c.top,c.bottom].indexOf(e)>=0?"y":"x";L[e]+=N[n]*t}))}return L}},133706:(e,t,n)=>{"use strict";function r(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}n.d(t,{default:()=>r})},373967:(e,t,n)=>{"use strict";function r(e){return"x"===e?"y":"x"}n.d(t,{default:()=>r})},506206:(e,t,n)=>{"use strict";function r(e){return e.split("-")[0]}n.d(t,{default:()=>r})},823607:(e,t,n)=>{"use strict";function r(){return{top:0,right:0,bottom:0,left:0}}n.d(t,{default:()=>r})},811516:(e,t,n)=>{"use strict";function r(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}n.d(t,{default:()=>r})},530697:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r={left:"right",right:"left",bottom:"top",top:"bottom"};function o(e){return e.replace(/left|right|bottom|top/g,(function(e){return r[e]}))}},30483:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r={start:"end",end:"start"};function o(e){return e.replace(/start|end/g,(function(e){return r[e]}))}},414943:(e,t,n)=>{"use strict";function r(e){return e.split("-")[1]}n.d(t,{default:()=>r})},600138:(e,t,n)=>{"use strict";n.d(t,{max:()=>r,min:()=>o,round:()=>i});var r=Math.max,o=Math.min,i=Math.round},300003:(e,t,n)=>{"use strict";function r(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}n.d(t,{default:()=>r})},563293:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(823607);function o(e){return Object.assign({},(0,r.default)(),e)}},50380:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(387701);function o(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function i(e){var t=o(e);return r.modifierPhases.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}},765626:(e,t,n)=>{"use strict";function r(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}n.d(t,{default:()=>r})},557516:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(600138);function o(e,t,n){return(0,r.max)(e,(0,r.min)(t,n))}},468518:(e,t,n)=>{"use strict";function r(){return"undefined"!=typeof __SENTRY_NO_DEBUG__&&!__SENTRY_BROWSER_BUNDLE__}function o(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,{isDebugBuild:()=>r,isBrowserBundle:()=>o})},82991:(e,t,n)=>{"use strict";n.d(t,{getGlobalObject:()=>i});var r=n(361422),o={};function i(){return(0,r.isNodeEnv)()?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:o}},361422:(e,t,n)=>{"use strict";n.d(t,{isNodeEnv:()=>o,dynamicRequire:()=>i,loadModule:()=>a});var r=n(468518);function o(){return!(0,r.isBrowserBundle)()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function i(e,t){return e.require(t)}function a(t){var n;try{n=i(e,t)}catch(e){}try{var r=i(e,"process").cwd;n=i(e,r()+"/node_modules/"+t)}catch(e){}return n}e=n.hmd(e)},130360:(e,t,n)=>{"use strict";n.d(t,{createStackParser:()=>o,stripSentryFramesAndReverse:()=>i,getFunctionName:()=>s});var r=n(750832);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,n){var o,a,s,c;void 0===n&&(n=0);var l=[];try{for(var u=(0,r.__values)(t.split("\n").slice(n)),d=u.next();!d.done;d=u.next()){var _=d.value;try{for(var p=(s=void 0,(0,r.__values)(e)),h=p.next();!h.done;h=p.next()){var f=(0,h.value)(_);if(f){l.push(f);break}}}catch(e){s={error:e}}finally{try{h&&!h.done&&(c=p.return)&&c.call(p)}finally{if(s)throw s.error}}}}catch(e){o={error:e}}finally{try{d&&!d.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}return i(l)}}function i(e){if(!e.length)return[];var t=e,n=t[0].function||"",o=t[t.length-1].function||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1)),-1!==o.indexOf("sentryWrapped")&&(t=t.slice(0,-1)),t.slice(0,50).map((function(e){return(0,r.__assign)((0,r.__assign)({},e),{filename:e.filename||t[0].filename,function:e.function||"?"})})).reverse()}var a="<anonymous>";function s(e){try{return e&&"function"==typeof e&&e.name||a}catch(e){return a}}},750832:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__extends:()=>o,__assign:()=>i,__rest:()=>a,__decorate:()=>s,__param:()=>c,__metadata:()=>l,__awaiter:()=>u,__generator:()=>d,__exportStar:()=>_,__values:()=>p,__read:()=>h,__spread:()=>f,__spreadArrays:()=>m,__await:()=>v,__asyncGenerator:()=>g,__asyncDelegator:()=>y,__asyncValues:()=>E,__makeTemplateObject:()=>w,__importStar:()=>b,__importDefault:()=>C,__classPrivateFieldGet:()=>S,__classPrivateFieldSet:()=>T});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function _(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function p(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function f(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(h(arguments[t]));return e}function m(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function v(e){return this instanceof v?(this.v=e,this):new v(e)}function g(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof v?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(e){u(i[0][3],e)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function y(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:v(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function E(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function b(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function C(e){return e&&e.__esModule?e:{default:e}}function S(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function T(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},170890:(e,t,n)=>{"use strict";n.d(t,{api:()=>l,setApiConfig:()=>c,upload:()=>u});var r=n(888082),o={domain:"api.vk.com",maxRetries:10},i=new r.R,a=new r.R,s=null;function c(e){e=Object.assign({},o,e),o=e}function l(e,t,n,u){void 0===u&&(u={});var d=o;n&&(d=Object.assign({},o,n));var _=t.captcha_sid;if(s&&s.sid!==_)return Promise.reject({type:"api_error",error:{error_code:0,error_msg:"Ddos limit execced"}});var p,h,f=d.domain,m=(0,r.m)((h={v:(p=d).version||"5.131"},p.appId&&(h.client_id=p.appId),h)),v=function(e){return{access_token:e.accessToken}}(d),g="https://"+f+"/method/"+e+"?"+m,y=Object.assign({},t,v),E=function(e,t){return void 0===t&&(t={}),e+"-"+(0,r.m)(Object.assign({},t))}(g,t),w=a.get(E)||a.create(E,d.maxRetries),b=i.get(E)||i.create(E);return(0,r.w)(w.get()||b.get()).then((function(){return(0,r.c)(g,y,u)})).then((function(o){var u,p;if(o.response)return a.delete(E),i.delete(E),s&&s.sid===_&&(null===(u=s.task)||void 0===u||u.resolve(void 0),s=null),o.response;var h=o.error;if(!h)return Promise.reject({type:"api_error",error:{error_code:0,error_msg:"Unknown"}});if(d.onCaptcha&&14===h.error_code){var f=h,m=f.captcha_sid,v=f.captcha_img;if(s){if(s.sid!==_)return s.task.get().then((function(){return l(e,t,n)}));var g=new r.P;g.get().then(s.task.resolve),s={sid:m,task:g}}else s={sid:m,task:new r.P};return d.onCaptcha({captcha_sid:m,captcha_img:v}).then((function(r){var o=Object.assign({},t,r);return l(e,o,n)}))}if(s&&s.sid===_&&(null===(p=s.task)||void 0===p||p.resolve(void 0),s=null),w.isExceeded()||b.isExceeded())return a.delete(E),i.delete(E),Promise.reject({type:"api_error",error:{error_code:0,error_msg:"Maximum of api retries exceeded"}});if(29===h.error_code)return b.increment(),a.delete(E),l(e,t,n);i.delete(E);var y=!(null==n?void 0:n.accessToken)&&(5===h.error_code||28==h.error_code);return d.onTokenExpired&&y?d.onTokenExpired().then((function(r){return w.increment(),c({accessToken:r}),l(e,t,n)})):(a.delete(E),Promise.reject({type:"api_error",error:o.error}))}),(function(e){return Promise.reject({type:"network_error",error:e})}))}function u(e,t){return fetch(e,{method:"POST",body:t,mode:"cors"}).then((function(e){return e.json()}))}},470751:(e,t,n)=>{"use strict";n.d(t,{login:()=>d,removeLoginCache:()=>_,setLoginConfig:()=>c});var r=n(888082),o=function(){function e(){}return e.setItemToStorage=function(e,t){try{localStorage.setItem(e,t)}catch(e){}},e.getItemFromStorage=function(e){try{return localStorage.getItem(e)}catch(e){}},e.removeItemFromStorage=function(e){try{localStorage.removeItem(e)}catch(e){}},e}(),i=/\d+:[a-zA-Z_]+:login:auth/,a=new r.R,s={domain:"login.vk.com",maxRetries:3};function c(e){e=Object.assign({},s,e),s=e}var l=new Map,u=new Map;function d(e,t,n,i,c){void 0===n&&(n={}),void 0===i&&(i=!1),void 0===c&&(c={});var p=Object.assign({},s,n),h=p.appId+":"+e+":login:auth",f=h+"--request",m=l.get(f);if(m)return m.get();var v,g=a.get(f)||a.create(f,p.maxRetries);return m=new r.P,l.set(f,m),(v=f,new Promise((function(e){null===o.getItemFromStorage(v)?(o.setItemToStorage(v,"1"),e()):setTimeout(e,(0,r.g)())}))).then((function(){return(0,r.w)(g.get())})).then((function(){var s=!u.get(f)||i,v=function(e){var t=o.getItemFromStorage(e),n={};if(t)try{n=JSON.parse(t)}catch(e){}return n}(h);if(!s&&v.expires&&1e3*Number(v.expires)-Date.now()>=r.O)return o.removeItemFromStorage(f),l.delete(f),m.resolve(v);var y=p.domain,E=p.onCaptcha,w="https://"+y+"/?act="+e,b=function(e){return{version:e.version||"1",app_id:e.appId}}(p),C=Object.assign({},t,b,{access_token:null==v?void 0:v.access_token});_(e,n),(0,r.c)(w,C,c).then((function(i){var s;if("error"===i.type)return l.delete(f),"check result failure"===i.error_info?g.isExceeded()?(a.delete(f),m.reject({type:"login_error",error:{error_code:0,error_msg:"Maximum of login retries exceeded"}})):(g.increment(),d(e,t,n).then(m.resolve).catch(m.reject)):(a.delete(f),m.reject({type:"login_error",error:i.error_info,errorCode:null!==(s=i.error_code)&&void 0!==s?s:"unknown_error"}));if(a.delete(f),"captcha"===i.type){if(!E)return m.reject({type:"login_error",error:"captcha"});var c=i.captcha_sid,_=i.captcha_img,p=i.captcha_type;return E({captcha_sid:c,captcha_img:_,captcha_type:p}).then((function(r){var o=Object.assign({},t,r);return l.delete(f),d(e,o,n).then(m.resolve).catch(m.reject)}))}var v=i.data.expires||1/0;o.setItemToStorage(h,JSON.stringify((0,r._)((0,r._)({},i.data),{expires:v}))),o.removeItemFromStorage(f),u.set(f,!0),l.delete(f),m.resolve(i.data)}),(function(e){a.delete(f),l.delete(f),m.reject({type:"network_error",error:e})}))})),m.get()}function _(e,t){if(e){var n=s;t&&(n=Object.assign({},s,t));var r=n.appId+":"+e+":login:auth";o.removeItemFromStorage(r)}else Object.keys(localStorage).forEach((function(e){i.test(e)&&o.removeItemFromStorage(e)}))}},888082:(e,t,n)=>{"use strict";n.d(t,{O:()=>a,P:()=>d,R:()=>u,_:()=>r,c:()=>i,g:()=>s,m:()=>o,w:()=>c});var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e){return Object.keys(e).map((function(t){var n=e[t];return(t=encodeURIComponent(t||""))+"="+encodeURIComponent(n||"")})).join("&")}function i(e,t,n){void 0===n&&(n={});var i=o(t);return fetch(e,r({method:"POST",body:i,mode:"cors",credentials:"include",headers:{"Content-Type":"application/x-www-form-urlencoded"}},n)).then((function(e){return e.json()}))}var a=6e4,s=function(e,t){return void 0===e&&(e=500),void 0===t&&(t=1500),~~(Math.random()*(t-e+1)+e)},c=function(e){return 0===e?Promise.resolve():new Promise((function(t){var n=function(e){if(0===e)return 0;var t=Math.random(),n=100*Math.pow(2,e)/2;return n+n*t}(e);setTimeout((function(){return t()}),n)}))},l=function(e){var t=this;void 0===e&&(e=1/0),this.tries=0,this.increment=function(){t.tries++},this.get=function(){return t.tries},this.isExceeded=function(){return t.tries>=t.maxTries},this.maxTries=e},u=function(){var e=this;this.retries=new Map,this.get=function(t){return e.retries.get(t)},this.create=function(t,n){return e.retries.set(t,new l(n)),e.retries.get(t)},this.delete=function(t){e.retries.delete(t)}},d=function(){var e=this;this.get=function(){return e.promise},this.resolve=function(t){return e.resolveHandler(t)},this.reject=function(t){return e.rejectHandler(t)},this.promise=new Promise((function(t,n){e.resolveHandler=t,e.rejectHandler=n}))}},624823:(e,t,n)=>{"use strict";n.d(t,{Embedded:()=>r});var r=function(){function e(e){var t=this;this.receiver=!1,this._requestId=1,this._requests={},this._onMessage=function(e){if(e.origin===t.origin&&e.data&&e.data.embeddedName===t.name){t.target=e.source;var n=e.data,r=n.response;if(r){var o=t._requests[r];o&&o(n.data),t._requests[r]=null}else n.request&&n.action&&Promise.resolve(t.onMessage(n.action,n.data)).then((function(e){t._sendResponse(n.request,n.action,e)}))}},this.name=e.name,this.target=e.target,this.origin=e.origin||"https://"+e.host,this.receiver=e.receiver||!1,this.onMessage=e.onMessage,window.addEventListener("message",this._onMessage,!1)}return e.prototype._sendResponse=function(e,t,n){this.target&&this.target.postMessage({embeddedName:this.name,action:t,response:e,data:n},this.origin)},e.prototype.sendMessage=function(e,t){var n=this;if(void 0===t&&(t={}),!this.target)return Promise.reject();var r=this._requestId,o=new Promise((function(e){n._requestId++,n._requests[r]=e}));return this.target.postMessage({embeddedName:this.name,action:e,data:t,request:r},this.origin),o},e.prototype.destroy=function(){window.removeEventListener("message",this._onMessage,!1),this.target=void 0},e}()},464380:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Api:()=>qn,BaseApi:()=>E,BaseLogger:()=>w,BaseSignaling:()=>C,CallDirection:()=>T,CallType:()=>D,ChatRoomEventType:()=>O,ConversationOption:()=>M,DebugMessageType:()=>zt,ExternalIdType:()=>$t,FacingMode:()=>mt,FatalError:()=>W,HangupReason:()=>Ve,HangupType:()=>H,MediaOption:()=>K,MediaTrackKind:()=>je,MediaType:()=>Xt,MuteState:()=>G,ParticipantState:()=>Y,ParticipantStatus:()=>Ft,RecordRole:()=>rr,Signaling:()=>Zn,SignalingCommandType:()=>$n,SignalingConnectionType:()=>X,SignalingNotification:()=>ee,UserRole:()=>ce,UserType:()=>de,Utils:()=>Xe,acceptCall:()=>mr,addMovie:()=>oo,addParticipant:()=>br,addParticipantInternal:()=>Cr,authorize:()=>fr,browser:()=>ir,callInternal:()=>_r,callTo:()=>dr,captureScreen:()=>Dr,changeConversationOptions:()=>Hr,changeDevice:()=>Ar,changeParticipantState:()=>Mr,changePriorities:()=>Rr,changeVideoEffect:()=>uo,chatHistory:()=>zr,chatMessage:()=>jr,chatMessageInternal:()=>Kr,createJoinLink:()=>$r,customData:()=>Gr,customDataInternal:()=>qr,debug:()=>co,debugMessage:()=>lo,declineCall:()=>vr,forceRelayPolicy:()=>Zr,getAnonymTokenByLink:()=>Qr,getStreamInfo:()=>ro,getWaitingHall:()=>po,grantRoles:()=>xr,grantRolesInternal:()=>Nr,hangup:()=>wr,init:()=>ur,joinCall:()=>gr,joinCallByLink:()=>Er,joinCallInternal:()=>yr,muteParticipant:()=>Br,muteParticipantInternal:()=>Ur,pinParticipant:()=>Fr,pinParticipantInternal:()=>Wr,processPush:()=>pr,processPushInternal:()=>hr,promoteParticipant:()=>ho,recordSetRole:()=>no,removeHistoryRecords:()=>fo,removeJoinLink:()=>Xr,removeMovie:()=>ao,removeParticipant:()=>Sr,removeParticipantInternal:()=>Tr,setApi:()=>ar,setAudioStream:()=>_o,setLocalResolution:()=>kr,setLogger:()=>cr,setMediaModifiers:()=>Vr,setSignalingFactory:()=>sr,setStatisticsInterval:()=>so,setVideoEffects:()=>lr,setVideoStream:()=>Pr,setVolume:()=>Jr,startConversation:()=>Yr,startStream:()=>eo,stopStream:()=>to,toggleLocalAudio:()=>Ir,toggleLocalVideo:()=>Or,updateDisplayLayout:()=>Lr,updateMovie:()=>io});var r,o,i=n(545580),a=n(406257),s=n.n(a),c=n(224736),l=n.n(c),u=n(538797),d=n(36090),_=n(535557),p=Object.defineProperty,h=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,v=Math.pow,g=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y=(e,t,n)=>new Promise(((r,o)=>{var i=e=>{try{s(n.next(e))}catch(e){o(e)}},a=e=>{try{s(n.throw(e))}catch(e){o(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,a);s((n=n.apply(e,t)).next())})),E=class{createJoinLink(e){return y(this,null,(function*(){return{join_link:"nop"}}))}removeJoinLink(e){return y(this,null,(function*(){return{success:!0}}))}getAnonymTokenByLink(e,t){return y(this,null,(function*(){return""}))}log(e){}prepareUserIds(e){return y(this,null,(function*(){}))}getCachedOkIdByExternalId(e){return null}cacheExternalId(e,t){}hangupConversation(e){}removeHistoryRecords(e){return y(this,null,(function*(){}))}cleanup(){}},w=class{log(e,t,n=!1){}destroy(){}},b=class{constructor(){this._handlers={},this._listeners=[]}_triggerEvent(e,...t){if(this._handlers.hasOwnProperty(e))for(let n of this._handlers[e])n.apply(this,t)}addEventListener(e,t){if("function"!=typeof t)throw new Error("Listener should be a function");return this._handlers.hasOwnProperty(e)||(this._handlers[e]=[]),this._handlers[e].push(t),{dispose:this.removeEventListener.bind(this,e,t)}}removeEventListener(e,t){if(!this._handlers.hasOwnProperty(e))return;t||delete this._handlers[e];let n=this._handlers[e].indexOf(t);n>=0&&this._handlers[e].splice(n,1)}subscribe(e,t,n){let r=e.addEventListener(t,n);this._listeners.push(r)}unsubscribe(){this._listeners.forEach((e=>{e.dispose()}))}},C=class extends b{get ready(){return!0}setParticipantIdRegistry(e){}requestRealloc(){}setEndpoint(e){}setConversationId(e){}readyToSend(){}cleanup(){}requestTestMode(e){}getNextCommandSequenceNumber(){return 0}},S=((r=S||{}).INCOMING="INCOMING",r.OUTGOING="OUTGOING",r.JOINING="JOINING",r),T=S,A=(e=>(e.USER="USER",e.GROUP="GROUP",e.CHAT="CHAT",e))(A||{}),D=A,P=((o=P||{}).ATTENDEE="ATTENDEE",o.HAND_UP="HAND_UP",o),O=P,I=(e=>(e.ADD_PARTICIPANT="ADD_PARTICIPANT",e.RECORD="RECORD",e))(I||{}),k=I,R=(e=>(e.REQUIRE_AUTH_TO_JOIN="REQUIRE_AUTH_TO_JOIN",e.AUDIENCE_MODE="AUDIENCE_MODE",e.WAITING_HALL="WAITING_HALL",e))(R||{}),M=R;var L,x,N,B,U,F=((L=F||{}).CAMERA_PERMISSION="camera",L.MIC_PERMISSION="mic",L.CAMERA_ACCESS="cameralock",L.MIC_ACCESS="miclock",L.MIC_NOT_FOUND="nomic",L.SCREEN_PERMISSION="screenpermission",L.SCREEN_ACCESS="screenlock",L.CONNECTION="connection",L.NETWORK="network",L.UNKNOWN="unknown",L.UNSUPPORTED="unsupported",L.SIGNALING_FAILED="signalingfailed",L.API="api",L.AUTH="auth",L),W=F,V=((x=V||{}).CANCELED="CANCELED",x.REJECTED="REJECTED",x.REMOVED="REMOVED",x.HUNGUP="HUNGUP",x.MISSED="MISSED",x.BUSY="BUSY",x.FAILED="FAILED",x.NETWORK_ERROR="NETWORK_ERROR",x.KILLED="KILLED",x.BANNED="BANNED",x.CALLER_IS_BLOCKED="CALLER_IS_BLOCKED",x.NOT_FRIENDS="NOT_FRIENDS",x.CALLEE_IS_OFFLINE="CALLEE_IS_OFFLINE",x.UNKNOWN_ERROR="UNKNOWN_ERROR",x.UNSUPPORTED="UNSUPPORTED",x.OLD_VERSION="OLD_VERSION",x.SERVICE_DISABLED="SERVICE_DISABLED",x.EXTERNAL_API_ERROR="EXTERNAL_API_ERROR",x.SOCKET_CLOSED="SOCKET_CLOSED",x.ENDED="ENDED",x),H=V,j=(e=>(e.AUDIO="AUDIO",e.VIDEO="VIDEO",e.SCREEN_SHARING="SCREEN_SHARING",e))(j||{}),K=j,z=(e=>(e.UNMUTE="UNMUTE",e.MUTE="MUTE",e.MUTE_PERMANENT="MUTE_PERMANENT",e))(z||{}),G=z,q=((N=q||{}).CALLED="CALLED",N.ACCEPTED="ACCEPTED",N.REJECTED="REJECTED",N.HUNGUP="HUNGUP",N),Y=q,$=(e=>(e.START="start",e.ACCEPT="accept",e.JOIN="join",e.RETRY="retry",e))($||{}),X=$,Q=(e=>(e.NOTIFICATION="NOTIFICATION",e.FAILED="FAILED",e.RECONNECT="RECONNECT",e))(Q||{}),J=Q,Z=((B=Z||{}).TRANSMITTED_DATA="transmitted-data",B.ACCEPTED_CALL="accepted-call",B.HUNGUP="hungup",B.PARTICIPANT_ADDED="participant-added",B.PARTICIPANT_JOINED="participant-joined",B.CLOSED_CONVERSATION="closed-conversation",B.MEDIA_SETTINGS_CHANGED="media-settings-changed",B.PARTICIPANT_STATE_CHANGED="participant-state-changed",B.RATE_CALL_DATA="rate-call-data",B.FEATURE_SET_CHANGED="feature-set-changed",B.TOPOLOGY_CHANGED="topology-changed",B.PRODUCER_UPDATED="producer-updated",B.CONSUMER_ANSWERED="consumer-answered",B.MULTIPARTY_CHAT_CREATED="multiparty-chat-created",B.FORCE_MEDIA_SETTINGS_CHANGE="force-media-settings-change",B.SETTINGS_UPDATE="settings-update",B.VIDEO_QUALITY_UPDATE="video-quality-update",B.REGISTERED_PEER="registered-peer",B.SWITCH_MICRO="switch-micro",B.RECORD_STARTED="record-started",B.RECORD_STOPPED="record-stopped",B.REALLOC_CON="realloc-con",B.AUDIO_ACTIVITY="audio-activity",B.SPEAKER_CHANGED="speaker-changed",B.STALLED_ACTIVITY="stalled-activity",B.CHAT_MESSAGE="chat-message",B.CUSTOM_DATA="custom-data",B.ROLES_CHANGED="roles-changed",B.MUTE_PARTICIPANT="mute-participant",B.PIN_PARTICIPANT="pin-participant",B.OPTIONS_CHANGED="options-changed",B.NETWORK_STATUS="network-status",B.PARTICIPANT_SOURCES_UPDATE="participant-sources-update",B.PROMOTE_PARTICIPANT="promote-participant",B.CHAT_ROOM_UPDATED="chat-room-updated",B.PROMOTION_APPROVED="promotion-approved",B.JOIN_LINK_CHANGED="join-link-changed",B),ee=Z,te=((U=te||{}).ERROR="callError",U.DEVICES="callDevices",U.CALL_SPEC_ERROR="callSpecError",U.ICE_CONNECTION_STATE="callIceConnectionState",U.ICE_CONNECTION_TYPE="callIceConnectionType",U.ICE_RESTART="callIceRestart",U.PUSH="callPush",U.OUTGOING_CALL="callStart",U.OUTGOING_MULTIPARTY_CALL="callStartMultiparty",U.JOIN_CONVERSATION="callJoinConversation",U.ACCEPTED_OUTGOING="callAcceptedOutgoing",U.ACCEPT_INCOMING="callAcceptIncoming",U.DECLINE_INCOMING="callDeclineIncoming",U.ACCEPT_CONCURRENT="callAcceptConcurrent",U.HANGUP="callHangup",U.MEDIA_STATUS="callMediaStatus",U.DEVICE_CHANGED="callDeviceChanged",U.SOCKET_ACTION="callSocketAction",U.ADD_PARTICIPANT="callAddParticipant",U.REMOVE_PARTICIPANT="callRemoveParticipant",U.POOR_CONNECTION="callPoorConnection",U.TOPOLOGY_CHANGE_REQUESTED="callTopologyChangeRequested",U.RELAY_POLICY="callForceRelay",U.PAT_ALLOCATED="patAllocate",U.PAT_DEALLOCATED="patDeallocate",U.PAT_ERROR="patError",U.PAT_WAITING_TIME_ERROR="patWaitingTimeError",U.PAT_OUTDATED_RESPONSE="patOutdatedResponse",U),ne=te,re=(e=>(e.AUDIO_MIX="audio-mix",e.PARTICIPANT_AGNOSTIC_TRACK_PREFIX="pat",e))(re||{}),oe=re,ie=(e=>(e.NO_AVAILABLE_TRACKS="no-available-tracks",e.UNKNOWN_ERROR="unknown-error",e))(ie||{}),ae=ie;var se=(e=>(e.CREATOR="CREATOR",e.ADMIN="ADMIN",e))(se||{}),ce=se;function le(e,t){if(e.length!==t.length)return!1;for(let n of e)if(!t.includes(n))return!1;return!0}var ue=(e=>(e.USER="USER",e.GROUP="GROUP",e))(ue||{}),de=ue,_e=2097152,pe=102400,he="_okcls_logs_session_";function fe(){return`${he}${Date.now()}`}function me(e){return new Blob([e]).size}function ve(e){try{window.localStorage.removeItem(e)}catch(e){console.error("Failed to remove log from storage",e)}}function ge(){let e=Ce.toString();if(!be.available||!e)return;let t=me(e);be.cleanup(t);try{window.localStorage.setItem(Se,e)}catch(e){return console.warn("Failed to write log to storage",e),be.storageSize=be.size+t,be.cleanup(pe+t),be.available>=pe+t?void ge():t>pe?(Ce.bisect(),void ge()):void(be.storageSize=0)}t>524288&&(be.add(Se,t),Se=fe(),Ce.clear(),be.cleanup(pe))}function ye(){!be.available||!Ce.length||ge()}function Ee(e=!1){let t=[];try{let e=window.localStorage;for(let n of be.items){let r=e.getItem(n.key);t.push(r)}let n=Ce.toString();n&&t.push(n)}catch(e){console.error("Storage is blocked",e)}let n=`[${t.join(",")}]`;if(e)return n;let r=`logs_${Date.now()}.json`;return function(e,t){let n=document.createElement("a"),r=new Blob([e],{type:"text/json"});n.href=URL.createObjectURL(r),n.download=t,n.click()}(n,r),r}function we(){be||(be=new class{constructor(){this._items=[],this._itemsSize=0,this._storageSize=_e;try{let e=window.localStorage;for(let t of Object.keys(e)){if(0!==t.indexOf(he))continue;let n=e.getItem(t);if(!n){ve(t);continue}let r=me(n);this.add(t,r)}}catch(e){console.error("Storage is blocked",e),this._storageSize=0}this._items.sort(((e,t)=>e.date-t.date)),this.cleanup(pe)}get size(){return this._itemsSize}get length(){return this._items.length}get available(){return Math.max(this._storageSize-this._itemsSize,0)}get items(){return this._items}set storageSize(e){this._storageSize=e}add(e,t){let n=parseInt(e.replace(he,""),10);this._itemsSize+=t,this._items.push({key:e,size:t,date:n})}deleteOldestItem(){let e=this._items.shift();e&&(ve(e.key),this._itemsSize-=e.size)}cleanup(e){for(;this.length&&(this.size>_e||this.length>4||this.size+e>this.available);)this.deleteOldestItem()}},Ce=new class{constructor(){this._items=[]}get length(){return this._items.length}push(e){this._items.push(e)}shift(){return this._items.shift()||null}bisect(){let e=this.length>1?Math.floor(this.length/2):1;this._items=this._items.slice(e)}clear(){this._items=[]}toString(){return this._items.length?JSON.stringify(this._items,((e,t)=>t instanceof Error?String(t):t)):""}},Se=fe(),window.addEventListener("beforeunload",ye))}var be,Ce,Se,Te=null;window.__VKCallsSDKLogs__=(e=!1)=>(be||we(),ye(),Ee(e));var Ae,De,Pe=((Ae=Pe||{}).INIT="init",Ae.READY="ready",Ae.FRAME="frame",Ae.ERROR="error",Ae.DEBUG="debug",Ae.LOG_ERROR="log_error",Ae),Oe=class extends w{constructor(e,t){super(),this._batchInterval=3e3,this._batch=[],this._batchTimeout=null,this._api=e,this._externalLogger=t}_send(e){this._api.log(e)}_sendBatch(){this._stopTimeout(),this._batch.length>0&&(this._send(this._batch),this._batch=[],this._startTimeout())}_startTimeout(){this._batchTimeout=window.setTimeout((()=>this._sendBatch()),this._batchInterval)}_stopTimeout(){this._batchTimeout&&(clearTimeout(this._batchTimeout),this._batchTimeout=null)}_onUnload(){this._sendBatch(),this._stopTimeout()}log(e,t,n=!1){let r={};void 0!==t&&(r.param=t),this._logInternal(e,r,n),this._externalLogger&&this._externalLogger.log(e,t,n)}logCustom(e,t,n=!1){this._logInternal(e,t,n)}_logInternal(e,t,n){let r={type:1,time:0,operation:e,timestamp:Date.now(),custom:t,uid:this._api.getUserId()};this._batch.push(r),(n||!this._batchTimeout)&&this._sendBatch()}destroy(){this._sendBatch(),this._stopTimeout(),this._externalLogger&&this._externalLogger.destroy()}static create(e,t){Oe._instance||(Oe._instance=new Oe(e,t))}static log(e,t,n=!1){Oe._instance&&Oe._instance.log(e,t,n)}static logCustom(e,t,n=!1){Oe._instance&&Oe._instance.logCustom(e,t,n)}static destroy(){Oe._instance&&Oe._instance.destroy(),Oe._instance=null}},Ie=class{constructor(){this._worker=null}_createWorker(e,t){return y(this,arguments,(function*(e,t,n=[],r={},o=[]){return new Promise(((i,a)=>{let s=n.join(","),c=new Blob([e,`exports.default(${s});`],{type:"application/javascript; charset=utf-8"}),l=window.URL.createObjectURL(c);this._worker=new Worker(l),this._worker.onmessage=e=>{switch(e.data.type){case Pe.READY:i();break;case Pe.ERROR:a(e.data.error);break;case Pe.FRAME:t(e.data);break;case Pe.DEBUG:Yt.debug(e.data.message);break;case Pe.LOG_ERROR:Oe.log(ne.ERROR,e.data.message)}},this._sendToWorker(Pe.INIT,r,o)}))}))}_removeWorker(){var e;null==(e=this._worker)||e.terminate(),this._worker=null}_sendToWorker(e,t={},n=[]){var r;null==(r=this._worker)||r.postMessage(Object.assign({type:e},t),n)}static isBrowserSupported(){throw new Error("Not implemented")}},ke=class extends Ie{init(e){return y(this,null,(function*(){Yt.debug("LibVPxDecoder started"),yield this._createWorker('var exports=(()=>{var y=Object.defineProperty;var E=a=>y(a,"__esModule",{value:!0});var M=(a,p)=>{E(a);for(var e in p)y(a,e,{get:p[e],enumerable:!0})};var D={};M(D,{default:()=>V});var t=(s=>(s.INIT="init",s.READY="ready",s.FRAME="frame",s.ERROR="error",s.DEBUG="debug",s.LOG_ERROR="log_error",s))(t||{});var V=(a,p)=>{let e=null,n=null,g=!0;function b(){return a({locateFile:p}).then(r=>n=r)}function s(r,m,l,R,x){if(!n){self.postMessage({type:t.LOG_ERROR,message:"decoder-init-fail-libvpx"}),self.postMessage({type:t.FRAME,error:"Fatal initialization error"});return}if(g!==l&&(g=l,e&&(e=null,self.postMessage({type:t.DEBUG,message:`LibVPxDecoder codec changed to ${l?"VP9":"VP8"} - reinitialize`}))),!e&&(self.postMessage({type:t.DEBUG,message:`LibVPxDecoder codec ${l?"VP9":"VP8"}`}),e=new n.VpxDecoder,e.debug(x),!e.init(l?n.VpxType.VP9:n.VpxType.VP8))){e=null,self.postMessage({type:t.FRAME,error:"Decoder failed to create"});return}try{e.allocateBuffer(m.byteLength).set(new Uint8Array(m))}catch(o){self.postMessage({type:t.DEBUG,message:o}),e=null,self.postMessage({type:t.FRAME,error:String(o)});return}if(!(e.decode()&&e.nextImage())){self.postMessage({type:t.FRAME,error:"Decode failed"});return}let d=e.getImageBuffer();if(!d){self.postMessage({type:t.FRAME,error:"No decoded data"});return}let c=e.getImageWidth(),f=e.getImageHeight();e.nextImage()&&(self.postMessage({type:t.DEBUG,message:"LibVPxDecoder dropped frame"}),self.postMessage({type:t.LOG_ERROR,message:"LibVPxDecoder-drop"}));let i=new Uint8ClampedArray(d.byteLength);if(i.set(d),R){let o=new ImageData(i,c,f);createImageBitmap(o,0,0,c,f).then(u=>{self.postMessage({type:t.FRAME,data:u},[u]),u.close()})}else self.postMessage({type:t.FRAME,data:i.buffer,width:c,height:f},[i.buffer])}b().then(()=>{self.onmessage=r=>{switch(r.data.type){case t.FRAME:s(r.data.timestamp,r.data.data,r.data.isVP9,r.data.useImageBitmap,r.data.debug);break}},self.postMessage({type:t.READY})}).catch(r=>{self.postMessage({type:t.ERROR,error:String(r)})})};return D;})();\n',(t=>{if(t.error)Yt.warn("LibVPxDecoder",t.error);else if(t.data instanceof ArrayBuffer){let n=new ImageData(new Uint8ClampedArray(t.data),t.width,t.height);e(n)}else e(t.data)}),[s(),s().getUrl])}))}decodeFrame(e,t,n,r){let o="ImageBitmap"in window;this._sendToWorker(Pe.FRAME,{timestamp:e,data:t.buffer,isVP9:n,keyFrame:r,useImageBitmap:o,debug:Yt.enabled()},[t.buffer])}destroy(){this._removeWorker(),Yt.debug("LibVPxDecoder destroyed")}static isBrowserSupported(){return"WebAssembly"in window&&"Worker"in window}},Re=class extends Ie{init(e){return y(this,null,(function*(){Yt.debug("WebCodecsDecoder started"),yield this._createWorker('var exports=(()=>{var l=Object.defineProperty;var f=e=>l(e,"__esModule",{value:!0});var E=(e,d)=>{f(e);for(var a in d)l(e,a,{get:d[a],enumerable:!0})};var y={};E(y,{default:()=>g});var c=(a=>(a.VP9="vp09.00.50.08",a.VP8="vp8",a))(c||{}),o=(t=>(t.INIT="init",t.READY="ready",t.FRAME="frame",t.ERROR="error",t.DEBUG="debug",t.LOG_ERROR="log_error",t))(o||{});var g=()=>{let e=null,d=!0;function a(){self.postMessage({type:o.READY})}function p(r,m,t,n=!1){if(!e||d!==t){if(!n){self.postMessage({type:o.DEBUG,message:"WebCodecsDecoder dropped frame - waiting for keyframe"});return}d=t,e?self.postMessage({type:o.DEBUG,message:`WebCodecsDecoder codec changed to ${t?"VP9":"VP8"}`}):(self.postMessage({type:o.DEBUG,message:`WebCodecsDecoder codec ${t?"VP9":"VP8"}`}),e=new VideoDecoder({output:s=>{("createImageBitmap"in s?s.createImageBitmap():createImageBitmap(s)).then(i=>{self.postMessage({type:o.FRAME,data:i}),i.close()}).finally(()=>s.close())},error:s=>{e&&e.state!=="closed"&&e.close(),e=null,self.postMessage({type:o.FRAME,error:"WebCodecsDecoder failed, reinitialize"})}})),e.configure({codec:t?c.VP9:c.VP8})}let u=new EncodedVideoChunk({type:n?"key":"delta",timestamp:r,data:m});e.decode(u)}self.onmessage=r=>{switch(r.data.type){case o.INIT:a();break;case o.FRAME:p(r.data.timestamp,r.data.data,r.data.isVP9,r.data.keyFrame);break}}};return y;})();\n',(t=>{t.error?Yt.warn("WebCodecsDecoder",t.error):e(t.data)}))}))}decodeFrame(e,t,n,r=!1){this._sendToWorker(Pe.FRAME,{timestamp:e,data:t.buffer,isVP9:n,keyFrame:r},[t.buffer])}destroy(){this._removeWorker(),Yt.debug("WebCodecsDecoder destroyed")}static isBrowserSupported(){return"VideoDecoder"in window&&"Worker"in window&&"VideoFrame"in window&&"ImageBitmap"in window&&"createImageBitmap"in window}},Me="_okcls_",Le=(()=>{try{let e=Date.now().toString(),t=window.localStorage,n=!1;return t.setItem(e,e),n=t.getItem(e)===e,t.removeItem(e),n?t:null}catch(e){return null}})();(e=>{e.get=function(e){return function(e){let t=Le?Le.getItem(Me+e):null;if(null===t)return null;try{return JSON.parse(t)}catch(e){return null}}(e)||null},e.set=function(e,t){!function(e,t){try{Le&&Le.setItem(Me+e,JSON.stringify(t))}catch(e){}}(e,t)},e.remove=function(e){!function(e){Le&&Le.removeItem(Me+e)}(e)}})(De||(De={}));var xe=De;function Ne(e,t){if(e.isAudioEnabled!==t.isAudioEnabled||e.isVideoEnabled!==t.isVideoEnabled||e.isScreenSharingEnabled!==t.isScreenSharingEnabled||e.videoStreams.length!==t.videoStreams.length)return!1;for(let n of e.videoStreams)if(!t.videoStreams.find((e=>e.id===n.id&&e.source===n.source)))return!1;return!0}function Be(e){return Object.assign({isAudioEnabled:!1,isVideoEnabled:!1,isScreenSharingEnabled:!1,videoStreams:[]},e||{})}var Ue,Fe=e=>e.stop(),We=e=>e.getVideoTracks().forEach(Fe),Ve=class extends Error{constructor(e,t){super(),this.name="HangupReason",this.code=t&&t.code||0,this.remote=t&&t.remote||!1,Object.values(H).indexOf(e)>-1?this.hangup=e:this.error=e;let n=[];this.error&&n.push("error"),this.remote&&n.push("remote"),this.code&&n.push(`code: ${this.code}`),t&&t.message&&n.push(`message: '${t.message}'`),this.message=e+(n.length?` (${n.join(", ")})`:""),Error.captureStackTrace&&Error.captureStackTrace(this,Ve)}},He=(e=>(e.SOURCE_CHANGED="SOURCE_CHANGED",e.TRACK_REPLACED="TRACK_REPLACED",e.SCREEN_STATUS="SCREEN_STATUS",e))(He||{}),je=(e=>(e.audio="audio",e.video="video",e.screen="screen",e))(je||{}),Ke=class extends b{constructor(){super(),this._stream=null,this._trackVideoStreamBackup=null,this._screenTrack=null,this._sendVideoTrack=null,this._mediaSettings=Be(),this._videoStatusOnScreenCapturingEnabled=!1,this._effect=null,this._initDeviceChangeListener()}request(){return y(this,arguments,(function*(e=[K.AUDIO],t=!0){if(this._stream)return;let n=e.includes(K.VIDEO),r=e.includes(K.AUDIO);if(!Ct.isBrowserSupported())throw new Ve(W.UNSUPPORTED);try{this._stream=yield Ct.getUserMedia(n,r,t),this._mediaSettings.isVideoEnabled=n&&this._stream.getVideoTracks().filter((e=>e.enabled)).length>0||!1,this._mediaSettings.isAudioEnabled=r&&this._stream.getAudioTracks().filter((e=>e.enabled)).length>0||!1}catch(e){throw new Ve(e)}}))}getStream(){return this._stream}getScreenTrack(){return this._screenTrack}getSendVideoTrack(e=!1){return this._sendVideoTrack&&!e?this._sendVideoTrack:this._stream?this._stream.getVideoTracks()[0]:null}_getSendAudioTrack(){var e;return(null==(e=this._stream)?void 0:e.getAudioTracks()[0])||null}addTrackToPeerConnection(e,t=!1,n=!1){let r=this.getStream(),o=this._getSendAudioTrack(),i=this.getSendVideoTrack(n);if(!r||!o&&!i&&!t)throw new Error("No local stream found");o&&!t&&e.addTrack(o,r),i&&!t&&e.addTrack(i,r)}getMediaSettings(){return this._mediaSettings}changeDevice(e){return y(this,null,(function*(){switch(e){case"videoinput":return this._changeVideoInput();case"audioinput":return this._changeAudioInput();default:return Promise.reject()}}))}setVideoStream(e,t){return y(this,null,(function*(){return t?this._changeScreen(e):this._changeVideoInput(e)}))}_initDeviceChangeListener(){if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices||!navigator.mediaDevices.addEventListener)return;let e=!1,t=!1,n=Xe.throttle((()=>{t&&this._changeVideoInput().catch((()=>{})),e&&this._changeAudioInput().catch((()=>{})),e=!1,t=!1}),1e3);this._onDeviceChange=()=>y(this,null,(function*(){if(!this._stream)return;let r=this._stream.getAudioTracks()[0],o=r&&r.enabled&&r.getSettings(),i=o&&o.deviceId,a=this._stream.getVideoTracks()[0],s=a&&a.enabled&&a.getSettings(),c=s&&s.deviceId;if(!i&&!c)return;let l=yield navigator.mediaDevices.enumerateDevices();!e&&i&&(e=!l.find((e=>e.deviceId===i))),!t&&c&&(t=!l.find((e=>e.deviceId===c))),n()})),navigator.mediaDevices.addEventListener("devicechange",this._onDeviceChange)}_destroyDeviceChangeListener(){this._onDeviceChange&&navigator.mediaDevices.removeEventListener("devicechange",this._onDeviceChange)}_changeVideoInput(e=null){return y(this,null,(function*(){try{let t=e?"stream":"video",n=e||(yield Ct.getUserVideo(void 0,!!this._effect));if(this._stream){Nt.consumerScreenTrack||this._disableScreenCapture();let e=this._getVideoEffectTrack(n),r=yield this._videoEffect(this._effect,e);this._stopLocalTrack("video"),Oe.log(ne.DEVICE_CHANGED,t),Yt.log("Video stream changed"),yield this._replaceLocalTrack(r),this._mediaSettings.isVideoEnabled=!0,this._triggerEvent("SOURCE_CHANGED",{kind:"video",mediaSettings:this._mediaSettings})}else n.getTracks().forEach((e=>e.stop()))}catch(e){throw Oe.log(ne.ERROR,"change_video"),Yt.warn("Camera change failed",e),e}}))}_getVideoEffectTrack(e){let t;return this._effect?(this._trackVideoStreamBackup||(this._trackVideoStreamBackup=e.getVideoTracks()[0].clone()),t=this._trackVideoStreamBackup.clone(),We(e)):this._trackVideoStreamBackup?(t=this._trackVideoStreamBackup.clone(),this._stopAndRemoveTrackVideoStreamBackup(),We(e)):t=e.getVideoTracks()[0],t}setAudioStream(e){return y(this,null,(function*(){return this._changeAudioInput(e)}))}_changeAudioInput(e=null){return y(this,null,(function*(){try{if(e=e||(yield Ct.getUserAudio()),this._stream){let t=e.getAudioTracks()[0];this._stopLocalTrack("audio"),Oe.log(ne.DEVICE_CHANGED,"audio"),Yt.log("Audio stream changed"),yield this._replaceLocalTrack(t),this._mediaSettings.isAudioEnabled=!0,this._triggerEvent("SOURCE_CHANGED",{kind:"audio",mediaSettings:this._mediaSettings})}else e.getTracks().forEach((e=>e.stop()))}catch(e){throw Oe.log(ne.ERROR,"change_audio"),Yt.error("Microphone change failed",e),e}}))}_changeScreen(e){return y(this,null,(function*(){try{if((e=e||(yield Ct.getScreenMedia())).addEventListener("inactive",(()=>{this._mediaSettings.isScreenSharingEnabled&&this.toggleScreenCapturing(!1)}),!1),this._stream){let t=e.getVideoTracks()[0],n=Nt.consumerScreenTrack?t:yield this._videoEffect(null,t);Oe.log(ne.DEVICE_CHANGED,"screen"),Yt.log("Screen capturing started"),this._screenTrack=n,this._mediaSettings.isScreenSharingEnabled=!0,Nt.consumerScreenTrack||(this._videoStatusOnScreenCapturingEnabled=this._mediaSettings.isVideoEnabled,this._mediaSettings.isVideoEnabled=!0,this._stopLocalTrack("video"),this._sendVideoTrack=Nt.consumerScreenDataChannel?Ct.getBlackMediaTrack(Nt.videoMinWidth,Nt.videoMinHeight):n,yield this._replaceLocalTrack(n,this._sendVideoTrack)),this._triggerEvent("SCREEN_STATUS",{track:n,mediaSettings:this._mediaSettings}),this._triggerEvent("SOURCE_CHANGED",{kind:"screen",mediaSettings:this._mediaSettings})}else e.getTracks().forEach((e=>e.stop()))}catch(e){throw Oe.log(ne.ERROR,"screen"),Yt.warn("Screen capturing failed",e),e}}))}_disableScreenCapture(){this._sendVideoTrack&&(this._sendVideoTrack.stop(),this._sendVideoTrack=null),this._screenTrack&&(this._screenTrack.stop(),this._screenTrack=null),this._mediaSettings.isScreenSharingEnabled&&(this._mediaSettings.isScreenSharingEnabled=!1,this._triggerEvent("SCREEN_STATUS",{mediaSettings:this._mediaSettings}),this._triggerEvent("SOURCE_CHANGED",{kind:"screen",mediaSettings:this._mediaSettings}))}_replaceLocalTrack(e,t){return y(this,null,(function*(){!this._stream||this._stream.getTracks().forEach((n=>{var r,o;n.kind===e.kind&&(null==(r=this._stream)||r.removeTrack(n),null==(o=this._stream)||o.addTrack(e),this._triggerEvent("TRACK_REPLACED",e,t))}))}))}_stopLocalTrack(e){this._stream&&this._stream.getTracks().forEach((t=>{t.kind===e&&t.stop()}))}_videoEffect(e,t){return y(this,null,(function*(){if(!Nt.videoEffects)return t;try{return Oe.log(ne.DEVICE_CHANGED,`effect_${e}`),Nt.videoEffects.setEffect(e,t)}catch(e){return Yt.warn("Video effect failed",e),t}}))}_stopAndRemoveTrackVideoStreamBackup(){this._trackVideoStreamBackup&&(this._trackVideoStreamBackup.stop(),this._trackVideoStreamBackup=null)}destroy(){this._destroyDeviceChangeListener(),Nt.videoEffects&&(this._effect=null,Nt.videoEffects.destroy()),this._stream&&(this._stream.getTracks().forEach(Fe),this._stream=null),this._stopAndRemoveTrackVideoStreamBackup(),this._disableScreenCapture()}toggleScreenCapturing(e){return y(this,null,(function*(){return e?this._changeScreen():Nt.consumerScreenTrack?this._disableScreenCapture():this._videoStatusOnScreenCapturingEnabled?this._changeVideoInput():this.toggleVideo(!1)}))}toggleVideo(e){return y(this,null,(function*(){if(!this._stream)return;let t;if(Nt.consumerScreenTrack||this._disableScreenCapture(),e){let e=yield Ct.getUserVideo(void 0,!!this._effect);t=this._getVideoEffectTrack(e),t=yield this._videoEffect(this._effect,t)}else t=Ct.getBlackMediaTrack(Nt.videoMinWidth,Nt.videoMinHeight),t=yield this._videoEffect(null,t),this._stopAndRemoveTrackVideoStreamBackup();this._stopLocalTrack("video"),yield this._replaceLocalTrack(t),this._mediaSettings.isVideoEnabled=e,this._triggerEvent("SOURCE_CHANGED",{kind:"video",mediaSettings:this._mediaSettings})}))}toggleAudio(e){return y(this,null,(function*(){if(!this._stream)return;let t;t=e?(yield Ct.getUserAudio()).getAudioTracks()[0]:Ct.getSilentMediaTrack(),this._stopLocalTrack("audio"),yield this._replaceLocalTrack(t),this._mediaSettings.isAudioEnabled=e,this._triggerEvent("SOURCE_CHANGED",{kind:"audio",mediaSettings:this._mediaSettings})}))}setResolution(e,t){return y(this,null,(function*(){if(!Nt.consumerScreenTrack&&this._mediaSettings.isScreenSharingEnabled)return;if(!this._stream)throw new Error("Local stream not found");let n=this._stream.getVideoTracks()[0];if(!n)throw new Error("Local video track not found");if(n.enabled){if(!this._effect)return n.applyConstraints({width:{ideal:e},height:{ideal:t}});yield this.toggleVideo(!1),yield this.toggleVideo(!0)}}))}updateNoiseSuppression(){return y(this,null,(function*(){if(!this._stream||!this._mediaSettings.isAudioEnabled)return;let e=this._stream.getAudioTracks()[0];if(!e)throw new Error("Local audio track not found");return e.enabled?e.applyConstraints({noiseSuppression:Nt.noiseSuppression}):void 0}))}videoEffect(e){return y(this,null,(function*(){if(!Nt.videoEffects)throw new Error("Video Effects library is not set");if(!Nt.consumerScreenTrack&&this._mediaSettings.isScreenSharingEnabled)throw new Error("Can't apply effect to screensharing");if(this._mediaSettings.isVideoEnabled)return this._stream&&e!==this._effect?(this._effect=e,this._changeVideoInput(this._stream)):void 0;this._effect=e}))}},ze=":";(e=>{e.patchSDP=function(e,t,n,r,o=!1){let i=/[\r\n]+/,a="\r\n";if(!t&&!n&&!r)return o?s(e.split(i)).join(a):e;function s(e){let t=e.findIndex((e=>e.startsWith("a=rtcp-fb:111")));return~t&&(e[t]=e[t]+a+["a=rtcp-fb:111 nack","a=rtcp-fb:111 nack pli"].join(a)),e}function c(e,t,n){let r,o=e.split(" "),i=o.slice(0,3);for(r=3;r<o.length;r++)n.includes(o[r])&&i.push(o[r]);for(r=3;r<o.length;r++)!n.includes(o[r])&&!t.includes(o[r])&&i.push(o[r]);return i.join(" ")}function l(e,t){let n,r=new RegExp("a=rtpmap:(\\d+) ([a-zA-Z0-9-]+)\\/\\d+"),o=[];for(n=0;n<e.length;++n){let i=e[n].match(r);i&&3===i.length&&i[2]===t&&o.push(i[1])}return o}function u(e,t,n,r){let o,i="m="+t;for(o=0;o<e.length;++o)if(e[o].startsWith(i)){e[o]=c(e[o],n,r);break}}let d=[],_=e.split(i);(n||t)&&(d=l(_,"H264"));let p=[];if(r&&(p=l(_,"VP9")),n){let e,t=d.slice(0),n=new RegExp("a=fmtp:(\\d+) apt=(\\d+)");for(e=0;e<_.length;++e){let r=_[e].match(n);r&&3===r.length&&t.includes(r[2])&&t.push(r[1])}let r=new RegExp("a=(rtpmap|rtcp-fb|fmtp):(\\d+) .*");for(e=_.length;e--;){let n=_[e].match(r);n&&3===n.length&&t.includes(n[2])&&_.splice(e,1)}u(_,"video",t,[])}else t&&u(_,"video",[],d);return r&&u(_,"video",[],p),o&&s(_),_.join(a)},e.getPeerIdString=function(e){return e?`${e.type||"WEB_SOCKET"}_${e.id}`:"_"},e.comparePeerId=function(e,t){return e&&e.id===t.id&&(e.type||"WEB_SOCKET")===(t.type||"WEB_SOCKET")},e.getPeerConnectionHostInfo=function(e){return y(this,null,(function*(){return e&&e.getStats?e.getStats(null).then((e=>{let t=null,n=null;if(e.forEach((t=>{"transport"===t.type&&t.selectedCandidatePairId?n=e.get(t.selectedCandidatePairId):"candidate-pair"===t.type&&"succeeded"===t.state&&!n&&(!t.hasOwnProperty("selected")||t.selected)&&(n=t)})),n&&n.localCandidateId){let r=e.get(n.localCandidateId);r&&(t={type:r.candidateType,ip:r.ip||r.ipAddress,port:r.port||r.portNumber})}return t})).catch((()=>null)):Promise.resolve(null)}))};let t=/^[0-9]+$/,n=/^([gu])([0-9]+)$/;function r(e,r){let o=String(e);return n.test(o)?(Yt.warn(`Already composite id [${e}] type supplied [${r}]`),o):r===de.GROUP?"g"+o:r===de.USER?"u"+o:(Yt.warn(`Unknown type [${r}] for id [${e}]`),o.match(t)?"u"+o:o)}function o(e,t,n){return i(r(e,t),n)}function i(e,t){return t?e+ze+"d"+t:e}function a(e){return o(e.id,e.idType||de.USER,e.deviceIdx||0)}function s(e,t,n,r,o){if(e&&n&&n.kind===je.video){let i=n.getSettings();if(i){let a=e.maxBitrateK?1024*e.maxBitrateK:null,s=i.width,c=i.height,l=s&&c&&e.maxDimension?Math.max(1,Math.max(s,c)/e.maxDimension):null,u=e.maxFramerate?e.maxFramerate:null,d=e.degradationPreference?e.degradationPreference:"balanced",_=r[n.id];if(_&&_.bitrate===a&&_.scaleResolutionDownBy===l&&_.maxFramerate===u&&_.degradationPreference===d)return void(o[n.id]=_);o[n.id]={bitrate:a,scaleResolutionDownBy:l,maxFramerate:u,degradationPreference:d};let p=t.getParameters();p.encodings||(p.encodings=[{}]),p.encodings.forEach((e=>{a?e.maxBitrate=a:delete e.maxBitrate,l?e.scaleResolutionDownBy=l:delete e.scaleResolutionDownBy,u?e.maxFramerate=u:delete e.maxFramerate})),p.degradationPreference=d,t.setParameters(p)}}}e.composeUserId=r,e.composeParticipantId=o,e.compose=i,e.composeId=a,e.composeMessageId=function(e){return e.participant?a(e.participant):o(e.participantId,e.participantType||de.USER,e.deviceIdx||0)},e.decomposeId=function(e){let t=String(e),r=t.match(n);return r?{id:Number(r[2]),type:"g"===r[1]?de.GROUP:de.USER}:(Yt.warn(`Unsupported compositeId [${e}]`),{id:Number(t),type:de.USER})},e.decomposeParticipantId=function(e){let t=e.split(":d");return{compositeUserId:t[0],deviceIdx:t.length>1?parseInt(t[1],10):0}},e.uuid=function(){var e,t;let n=null==(t=null==(e=window.crypto)?void 0:e.randomUUID)?void 0:t.call(e);if(n)return n;let r,o,i="0123456789abcdefghijklmnopqrstuvwxyz".split(""),a=new Array(36),s=0;for(o=0;o<36;o++)8===o||13===o||18===o||23===o?a[o]="-":14===o?a[o]="4":(s<=2&&(s=33554432+16777216*Math.random()|0),r=15&s,s>>=4,a[o]=i[19===o?3&r|8:r]);return a.join("")},e.throttle=function(e,t){let n;return function(){let r=this,o=arguments;n&&window.clearTimeout(n),n=window.setTimeout((()=>{e.apply(r,o)}),t)}},e.sdpFingerprint=function(e){let t="",n=e.split("\n");for(let e of n)if(e.startsWith("a=fingerprint")){let n=e.split(" ");if(2===n.length){t=n[1];break}}if(!t)return l().minusOne;let r=t.split(":"),o=l().zero;for(let e=Math.min(7,r.length-1);e>=0;e--){let t=l()(r[e],16);o=o.shiftLeft(8).or(t)}return((e,t)=>{let n=t.value;if("bigint"==typeof n)return l()(BigInt.asIntN(64,n));let r=l().one.shiftLeft(64),o=t.and(r.subtract(1));return o.greaterOrEquals(r.subtract(o))?o.subtract(r):o})(0,o)},e.delay=function(e){return y(this,null,(function*(){return new Promise((t=>window.setTimeout(t,e)))}))},e.applySettings=function(e,t,n){let r=[];return e.getSenders().forEach((e=>s(t,e,e.track,n,r))),r},e.applyVideoTrackSettings=s,e.includesOneOf=function(e,t){Array.isArray(t)||(t=[t]);for(let n of t)if(e.includes(n))return!0;return!1},e.mapParticipantState=function(e){var t;return Object.entries((null==(t=e.participantState)?void 0:t.state)||{}).reduce(((t,[n,r])=>(e.participantState&&(t[n]={ts:e.participantState.stateUpdateTs[n],state:r}),t)),{})},e.mapLegacyParticipantState=function(e){return Object.entries(e).reduce(((e,[t,{state:n}])=>(e[t]=n,e)),{})},e.mapSharedParticipants=function(e){return e.map((e=>{let t={uid:e.externalId,mediaSettings:e.mediaSettings,status:e.status,muteStates:e.muteStates,unmuteOptions:e.unmuteOptions};return Nt.participantStateMapped&&(t.participantState=e.participantState),t}))},e.isEqualParticipantState=function(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n)if(!r.hasOwnProperty(o)||e[o].state!==t[o].state||e[o].ts!==t[o].ts)return!1;return!0},e.isObjectsEquals=function(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!t.hasOwnProperty(r)||e[r]!==t[r])return!1;return!0},e.isArraysEquals=function(e,t){if(e.length!==t.length)return!1;for(let n of e)if(t.indexOf(n)<0)return!1;return!0},e.isEmptyObject=function(e){return!Object.keys(e).length}})(Ue||(Ue={}));var Ge,qe,Ye,$e,Xe=Ue,Qe=null,Je=null,Ze=[],et=[],tt=[],nt=null,rt=null,ot=null,it=!1,at=!1,st=!1,ct=!1,lt=null,ut="",dt=[],_t=null,pt=navigator.appVersion,ht=navigator.appName,ft=navigator.userAgent,mt=(e=>(e.USER="user",e.ENVIRONMENT="environment",e.LEFT="left",e.RIGHT="right",e))(mt||{}),vt=class{constructor(e,t=!1,n=Nt.videoMaxWidth,r=Nt.videoMaxHeight){let o=!1;if(e){let t;o={noiseSuppression:Nt.noiseSuppression,echoCancellation:!0,autoGainControl:!0},rt&&(t=rt.deviceId),"string"==typeof e&&(t=e),t&&(o.deviceId={ideal:t})}let i=!1;if(t){let e;i={width:{min:Nt.videoMinWidth,max:n,ideal:n},height:{min:Nt.videoMinHeight,max:r,ideal:r},aspectRatio:{ideal:Nt.videoAspectRatio},frameRate:{ideal:Nt.videoFrameRate}},nt&&(e=nt.deviceId),"string"==typeof t&&(e=t),e&&(i.deviceId={ideal:e}),Nt.videoFacingMode&&(i.facingMode={ideal:Nt.videoFacingMode})}this.audio=o,this.video=i,this.needVideo=!!i}getNative(){return Object.assign({},{audio:this.audio,video:this.video})}simplify(){return"object"==typeof this.video&&(this.video.width||this.video.height?(delete this.video.width,delete this.video.height):this.video.aspectRatio?delete this.video.aspectRatio:this.video.frameRate?delete this.video.frameRate:(this.video.deviceId||this.video.facingMode)&&(delete this.video.deviceId,delete this.video.facingMode)),"object"==typeof this.audio&&(this.audio.echoCancellation||this.audio.autoGainControl||this.audio.noiseSuppression?(delete this.audio.echoCancellation,delete this.audio.autoGainControl,delete this.audio.noiseSuppression):this.audio.deviceId&&delete this.audio.deviceId),!0===this.video&&!0===this.audio?this.video=!1:!1===this.video&&!0===this.audio?(this.audio=!1,this.video=this.needVideo):!0===this.video&&!1===this.audio&&(this.video=!1),this.video&&!Object.keys(this.video).length&&(this.video=!0),this.audio&&!Object.keys(this.audio).length&&(this.audio=!0),this}canSimplify(){let e="object"==typeof this.video&&(this.video.width||this.video.height||this.video.aspectRatio||this.video.frameRate||this.video.facingMode||this.video.deviceId)||this.video;return!!("object"==typeof this.audio&&(this.audio.deviceId||this.audio.noiseSuppression||this.audio.echoCancellation||this.audio.autoGainControl)||this.audio||e)}isVideo(){return!!this.video}isAudio(){return!!this.audio}},gt=class extends vt{constructor(e,t){super(!1,!0),"object"==typeof this.video?(delete this.video.deviceId,delete this.video.aspectRatio,delete this.video.frameRate,delete this.video.facingMode):this.video={},this.video.cursor="motion",this.video.width=e,this.video.height=t,this.video.frameRate=Nt.screenFrameRate}};function yt(){Qe=null,Et().then((()=>Kt.onDeviceChange()))}function Et(){return y(this,null,(function*(){return Qe||(navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?(!Je&&navigator.mediaDevices.addEventListener&&(Je=Xe.throttle(yt,1e3),navigator.mediaDevices.addEventListener("devicechange",Je)),Qe=navigator.mediaDevices.enumerateDevices().then((e=>{Ze=e.filter((e=>"videoinput"===e.kind&&(e.label&&(it=!0),!0))),et=e.filter((e=>"audioinput"===e.kind&&(e.label?at=!0:$e.isMobile()&&"Firefox"===$e.browserName()&&(at=it),!0))),tt=e.filter((e=>"audiooutput"===e.kind));let t=xe.get("videoinput"),n=xe.get("audioinput"),r=xe.get("audiooutput");return nt=Ze.find((e=>e.deviceId===t))||null,rt=et.find((e=>e.deviceId===n))||null,ot=tt.find((e=>e.deviceId===r))||null,Qe=Promise.resolve(e),e})).catch((()=>(Qe=null,[])))):[])}))}function wt(e,t){return y(this,null,(function*(){Yt.debug("Try to get media",e.getNative());let n=$e.hasPermissions(e.isVideo());!n&&!t&&Kt.onPermissionsRequested();try{let t=yield navigator.mediaDevices.getUserMedia(e.getNative());return n||(yield function(){return y(this,null,(function*(){Qe=null,yield Et()}))}()),t}catch(n){switch(n.name){case"PermissionDeniedError":case"PermissionDismissedError":case"NotAllowedError":case"SecurityError":case"DOMException":t=e.isVideo()?W.CAMERA_PERMISSION:W.MIC_PERMISSION;break;case"OverconstrainedError":case"TypeError":case"NotFoundError":break;case"AbortError":case"NotReadableError":t=e.isVideo()?W.CAMERA_ACCESS:W.MIC_ACCESS}if(e.canSimplify())return wt(e.simplify(),t);let r=t||W.UNKNOWN;throw Kt.onPermissionsError(r),r}}))}function bt(){return dt.length||(dt=(()=>{let e,t=!1,n=0,r="0",o=ft.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];if(/trident/i.test(o[1]))return e=/\brv[ :]+(\d+)/g.exec(ft),["IE",e&&e[1]||"Unknown",t,n,r];if("Safari"===o[1]){if(e=ft.match(/\bEdge\/(\d+)/),e)return["Edge",e[1]||"Unknown",t,n,r];if(e=ft.match(/\bCriOS\/(\d+)/),e)return["Chrome",e[1],!0,Number(e[1]),r];if(e=ft.match(/\bFxiOS\/(\d+)/),e)return["Firefox",e[1],!1,n,r];if(e=ft.match(/\bYaBrowser\/(\d+)/),e)return["Yandex",e[1],!1,n,r];if(e=ft.match(/\bOPT\/(\d+)/),e)return["Opera",e[1],!1,n,r]}if("Chrome"===o[1]){if(t=!0,n=Number(o[2]),e=ft.match(/\bOPR\/(\d+)/),e)return["Opera",e[1]||"Unknown",t,n,r];if(e=ft.match(/\bYaBrowser\/(\d+)/),e)return["Yandex",e[1]||"Unknown",t,n,r];if(e=ft.match(/\bSferum\/((\d+)(?:\.\d+)*)/),e)return["Sferum",e[1]||"Unknown",t,n,r];if(e=ft.match(/\bEdge?\/(\d+)/),e)return["Edge",e[1]||"Unknown",t,n,r];if(void 0!==window.opr&&/^(.+\.)?ok.ru$/.test(window.location.host))return["Opera","Hidden",t,n,r]}return e=ft.match(/version\/(\d+)(?:(?:\.)(\d+))?/i),e&&void 0!==e[2]&&(r=e[2]),[o[2]?o[1]:ht,e&&e[1]||o[2]||pt,t,n,r]})()),dt}(e=>{function t(){return Ze.length>0}function n(){return et.length>0}function r(){return it}function o(){return at}function i(){if(!Ye||"ended"===Ye.readyState){let e=l(),t=e.createMediaStreamDestination(),n=e.createGain();n.gain.value=1e-5,n.connect(t),n.connect(e.destination);let r=e.createOscillator();r.type="sine",r.frequency.value=0,r.connect(n),r.start(),Ye=t.stream.getAudioTracks()[0]}return Object.assign(Ye.clone(),{enabled:!1})}function a(e=Nt.videoMinWidth,t=Nt.videoMinHeight){return qe||(qe=document.createElement("canvas")).getContext("2d"),qe.width=e,qe.height=t,(!Ge||"ended"===Ge.readyState)&&(Ge=qe.captureStream(Nt.videoFrameRate).getVideoTracks()[0]),Object.assign(Ge.clone(),{enabled:!1})}function s(){return bt()[0]}function c(){return bt()[1]}function l(){return _t||(_t=new(window.AudioContext||window.webkitAudioContext)),_t}e.init=function(){return y(this,null,(function*(){return yield function(){return y(this,null,(function*(){return $e.isBrowserSupported()?new Promise((e=>{(new window.RTCPeerConnection).createOffer({offerToReceiveVideo:!0}).then((t=>{/^a=rtpmap:\d+ VP8\/\d+$/m.test(t.sdp)&&(st=!0),/^a=mid:0$/m.test(t.sdp)&&(ct=!0),e()})).catch(e)})):Promise.resolve()}))}(),Et()}))},e.getCameras=function(){return Ze},e.getMicrophones=function(){return et},e.getOutput=function(){return tt},e.hasCamera=t,e.hasMicrophone=n,e.getSavedCamera=function(){return nt},e.getSavedMicrophone=function(){return rt},e.getSavedOutput=function(){return ot},e.hasCameraPermission=r,e.hasMicrophonePermission=o,e.hasPermissions=function(e=!1){return!!o()&&(!t()||!e||r())},e.getUserMedia=function(e=!1,r=!0,o=!0){return y(this,null,(function*(){let s,c=n()&&r,l=t()&&e;if(c||l)try{s=yield wt(new vt(c,l))}catch(e){s=new MediaStream}else s=new MediaStream;return!s.getVideoTracks().length&&o&&s.addTrack(a()),!s.getAudioTracks().length&&o&&s.addTrack(i()),s}))},e.getScreenMedia=function(){return y(this,null,(function*(){return function(e){return y(this,null,(function*(){Yt.debug("Try to get screen",e.getNative());try{let t=yield navigator.mediaDevices.getDisplayMedia(e.getNative()),n=null==t?void 0:t.getVideoTracks()[0];return n&&(Yt.debug("Got display media track",n.id),n.contentHint="text"),t}catch(e){switch(e.name){case"PermissionDeniedError":case"NotAllowedError":case"SecurityError":throw W.SCREEN_PERMISSION;default:throw W.SCREEN_ACCESS}}}))}(new gt(window.screen.width,window.screen.height))}))},e.getUserVideo=function(e,t=!1){return y(this,null,(function*(){let n=t?Nt.videoEffectMaxWidth:Nt.videoMaxWidth,r=t?Nt.videoEffectMaxHeight:Nt.videoMaxHeight;return wt(new vt(!1,e||!0,n,r))}))},e.getUserAudio=function(e){return y(this,null,(function*(){return wt(new vt(e||!0,!1))}))},e.saveDeviceId=function(e,t){return y(this,null,(function*(){let n=(yield Et()).find((n=>n.kind===e&&n.deviceId===t));return n?("videoinput"===e?nt=n:"audioinput"===e?rt=n:"audiooutput"===e&&(ot=n),xe.set(e,t),n):null}))},e.getSilentMediaTrack=i,e.getBlackMediaTrack=a,e.isBrowserSupported=function(){if("Edge"===s()&&Number(c())<70)return!1;try{let e=window;return!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia&&e.RTCPeerConnection&&e.RTCIceCandidate&&e.RTCSessionDescription&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.captureStream&&e.RTCRtpSender&&e.RTCRtpSender.prototype.replaceTrack&&e.RTCRtpSender.prototype.getParameters&&navigator.sendBeacon)}catch(e){return!1}},e.isScreenCapturingSupported=function(){return!!navigator.mediaDevices.getDisplayMedia},e.canVP8=function(){return st},e.isUnifiedPlan=function(){return ct},e.isBrokenH264=function(){let t="Safari"===e.browserName()&&"15"===e.browserVersion()&&"1"===e.browserSubVersion(),n="Opera"===e.browserName()&&"Windows"===e.os();return t||n},e.canPreferH264=function(){return!(e.baseChromeVersion()&&e.isMobile())},e.os=function(){return ut||(ut=(()=>{let e={Windows:/Win/,Android:/Android/,OpenBSD:/OpenBSD/,SunOS:/SunOS/,Linux:/(Linux|X11)/,iPad:/(iPad)/,iPhone:/(iPhone)/,iPod:/(iPod)/,MacOS:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh|Mac OS X)/,QNX:/QNX/,UNIX:/UNIX/,BeOS:/BeOS/,OS2:/OS\/2/,Bot:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/};for(let t in e)if(e.hasOwnProperty(t)&&e[t].test(ft))return t;return"Unknown"})()),ut},e.isMobile=function(){return null===lt&&(lt=/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(pt)),lt},e.browserName=s,e.browserVersion=c,e.baseChromeVersion=function(){return bt()[3]},e.getAudioContext=l,e.browserSubVersion=function(){return bt()[4]}})($e||($e={}));var Ct=$e,St=class{constructor(e,t){this._chunks=[],this._participantId=e,this._onStream=t}appendChunk(e){let t=this._chunks.length;if(e.start)t&&(Yt.warn("[FrameBuilder] Cleanup buffer",Array.prototype.slice.call(this._chunks)),this._chunks=[]);else if(!t||(this._chunks[t-1].sequence+1)%65536!==e.sequence)return void Yt.warn("[FrameBuilder] Got incorrect chunk");if(this._chunks.push(e),e.end){let t=this._processFrameData(),{width:n,height:r}=St.getFrameSize(t);this._processFrame({timestamp:e.timestamp,frameData:t,isVP9:e.isVP9,keyframe:e.keyframe,width:n,height:r})}}destroy(){this._chunks=[]}_processFrameData(){let e=this._chunks;this._chunks=[];let t=e.reduce(((e,t)=>e+t.data.byteLength),0),n=new Uint8Array(t),r=0;for(let t of e)n.set(new Uint8Array(t.data),r),r+=t.data.byteLength;return n}static getFrameSize(e){let t={width:0,height:0},n=new u.BitStream(e.buffer);n.bigEndian=!0,n.index+=2;let r=n.readBits(1),o=n.readBits(1)<<1|r;return 3===o&&n.index++,1===n.readBits(1)||0!==n.readBits(1)||(n.index++,n.index++,n.index+=24,o>=2&&n.index++,7!==n.readBits(3)?(n.index++,(1===o||3===o)&&(n.index+=3)):(1===o||3===o)&&n.index++,t.width=n.readBits(16)+1,t.height=n.readBits(16)+1),t}static isBrowserSupported(){throw new Error("Method `isBrowserSupported` is not implemented")}},Tt=class extends St{constructor(e,t){super(e,t),this._decoderReady=!1,this._decoderQueue=[],this._canvas=null,this._canvasContext=null,this._stream=null,this._track=null,Yt.debug(`StreamBuilder started for participant [${e}]`),this._useImageBitmap="ImageBitmap"in window,Re.isBrowserSupported()?this._decoder=new Re:this._decoder=new ke,this._decoder.init((e=>this._drawImage(e))).then((()=>{this._decoderReady=!0,this._decodeQueue()}))}_createStream(e,t){this._canvas||(this._canvas=document.createElement("canvas"),this._canvas.width=e,this._canvas.height=t,this._canvas.style.pointerEvents="none",this._canvas.style.visibility="hidden",this._canvas.style.position="absolute",this._canvas.style.width="160px",this._canvas.style.height="90px",this._canvas.style.bottom="0",this._canvas.style.right="0",this._canvas.style.zIndex="5000",document.body.appendChild(this._canvas),this._useImageBitmap?this._canvasContext=this._canvas.getContext("bitmaprenderer"):this._canvasContext=this._canvas.getContext("2d"),this._stream=this._canvas.captureStream(0),this._track=this._stream.getVideoTracks()[0],this._track.contentHint="text")}_removeStream(){this._stream&&(this._stream.getTracks().forEach((e=>e.stop())),this._stream=null,this._track=null),this._canvasContext=null;try{this._canvas&&document.body.removeChild(this._canvas)}catch(e){}this._canvas=null}_requestCanvasFrame(){this._track&&this._track.requestFrame?this._track.requestFrame():this._stream&&this._stream.requestFrame&&this._stream.requestFrame()}_drawImage(e){this._track||(this._createStream(e.width,e.height),this._onStream(this._stream));let t=this._canvas;if(t.width=e.width,t.height=e.height,e instanceof ImageData){let n=this._canvasContext;n.clearRect(0,0,t.width,t.height),n.putImageData(e,0,0)}else this._canvasContext.transferFromImageBitmap(e);this._requestCanvasFrame()}_processFrame(e){!this._decoderReady||this._decoderQueue.length?(this._decoderQueue.push(e),this._decodeQueue()):this._decoder.decodeFrame(e.timestamp,e.frameData,e.isVP9,e.keyframe)}_decodeQueue(){if(!this._decoderReady)return;let e=this._decoderQueue;this._decoderQueue=[],e.forEach((e=>{this._decoder.decodeFrame(e.timestamp,e.frameData,e.isVP9,e.keyframe)}))}destroy(){super.destroy(),this._decoder.destroy(),this._removeStream(),Yt.debug(`StreamBuilder destroyed for participant ${this._participantId}`)}static isBrowserSupported(){return("CanvasCaptureMediaStream"in window||"CanvasCaptureMediaStreamTrack"in window)&&!("Safari"===Ct.browserName()&&Number(Ct.browserVersion())>=15)}};var At=v(2,15)-1,Dt=class{constructor(e){this._queue=[],this._clearBufferTill=0,this._mediaSource=new MediaSource,this._codec=e;let t=()=>{this._mediaSource.removeEventListener("sourceopen",t),this._initBuffer(),this._handleQueue()};this._mediaSource.addEventListener("sourceopen",t,!1)}_handleQueue(){if(!this._sourceBuffer||this._sourceBuffer.updating||!this._queue.length)return;if(this._clearBufferTill&&this._sourceBuffer.buffered.length){let e=this._sourceBuffer.buffered.start(0);return e<this._clearBufferTill&&(this._sourceBuffer.remove(e,this._clearBufferTill),Yt.debug(`[WebmBuilder] SourceBuffer cleanup from ${e} to ${this._clearBufferTill}`)),void(this._clearBufferTill=0)}let e=this._queue;this._queue=[];let t=Dt._buildQueue(e);this._sourceBuffer.appendBuffer(t)}static _buildQueue(e){if(!e.length)return new Uint8Array;if(1===e.length)return d.build(e[0]);let t=e.reduce(((e,t)=>e+t.countSize()),0),n=new Uint8Array(t),r=0;for(let t of e){let e=d.build(t);n.set(e,r),r+=e.byteLength}return n}_initBuffer(){this._sourceBuffer=this._mediaSource.addSourceBuffer(`video/webm; codecs="${this._codec}"`),this._sourceBuffer.mode="sequence",this._sourceBuffer.addEventListener("updateend",(()=>this._handleQueue()))}changeType(e){var t;return this._codec=e,null==(t=this._sourceBuffer)?void 0:t.changeType(e)}append(e,t=!1){this._queue.push(e),t&&this._handleQueue()}cleanup(){var e,t,n;"open"===(null==(e=this._mediaSource)?void 0:e.readyState)&&(null==(t=this._sourceBuffer)||t.abort());let r=null==(n=this._sourceBuffer)?void 0:n.buffered,o=null==r?void 0:r.length;if(!o)return;let i=r.start(0),a=Math.max(0,r.end(o-1)-5);a-i>5&&(this._clearBufferTill=a)}destroy(){this._queue=[],"open"===this._mediaSource.readyState&&(this._sourceBuffer.abort(),this._mediaSource.endOfStream()),this._sourceBuffer=null,this._clearBufferTill=0}get codec(){return this._codec}get mediaSource(){return this._mediaSource}get buffered(){var e;return null==(e=this._sourceBuffer)?void 0:e.buffered}},Pt=class extends St{constructor(e,t){super(e,t),this._video=null,this._stream=null,this._earliestTimestamp=0,this._clusterStartTime=0,this._lastFrameTimestamp=0,Yt.debug(`[WebmBuilder] started for participant [${e}]`)}static _intToU16BE(e){return new Uint8Array([e>>8,e])}static _genWebmHeader(){return d.element(d.ID.EBML,[d.element(d.ID.EBMLVersion,d.number(1)),d.element(d.ID.EBMLReadVersion,d.number(1)),d.element(d.ID.EBMLMaxIDLength,d.number(4)),d.element(d.ID.EBMLMaxSizeLength,d.number(8)),d.element(d.ID.DocType,d.string("webm")),d.element(d.ID.DocTypeVersion,d.number(2)),d.element(d.ID.DocTypeReadVersion,d.number(2))])}static _genSegmentHeader(e,t,n){let r=d.element(d.ID.Info,[d.element(d.ID.TimecodeScale,d.number(1e6)),d.element(d.ID.MuxingApp,d.string("vk-webm-builder")),d.element(d.ID.WritingApp,d.string("vk-webm-builder"))]),o=[d.element(d.ID.PixelWidth,d.number(e)),d.element(d.ID.PixelHeight,d.number(t))],i=d.element(d.ID.Tracks,d.element(d.ID.TrackEntry,[d.element(d.ID.TrackNumber,d.number(1)),d.element(d.ID.TrackUID,d.number(1)),d.element(d.ID.TrackType,d.number(1)),d.element(d.ID.FlagLacing,d.number(0)),d.element(d.ID.DefaultDuration,d.number(1e9)),d.element(d.ID.CodecID,d.string(`V_${n.toUpperCase()}`)),d.element(d.ID.Video,o)]));return d.unknownSizeElement(d.ID.Segment,[r,i])}static _genClusterHeader(e){return d.unknownSizeElement(d.ID.Cluster,[d.element(d.ID.Timecode,d.number(Math.round(e)))])}_createVideo(e){this._mediaBuffer=new Dt(e),this._video=document.createElement("video"),this._video.autoplay=!0,this._video.controls=!1,this._video.muted=!0,this._video.style.pointerEvents="none",this._video.style.visibility="hidden",this._video.style.position="absolute",this._video.style.width="160px",this._video.style.height="90px",this._video.style.bottom="0",this._video.style.right="0",this._video.style.zIndex="5000",this._video.src=URL.createObjectURL(this._mediaBuffer.mediaSource),document.body.appendChild(this._video);let t=()=>{if(this._video.src){Yt.warn(`[WebmBuilder] Video paused for participant [${this._participantId}], try to play again`);let e=this._video.seekable;e.length&&(this._video.currentTime=e.end(e.length-1)-.1),this._video.play().catch((()=>{}))}};this._video.onpause=t,this._video.onwaiting=t,this._video.onstalled=t,this._video.onerror=()=>Yt.warn(`[WebmBuilder] Video Error for participant [${this._participantId}]`,this._video.error),this._stream=this._video.captureStream(),this._onStream(this._stream)}_processFrame(e){let t=e.isVP9?"vp9":"vp8";this._mediaBuffer?this._mediaBuffer.codec!==t&&this._mediaBuffer.changeType(t):this._createVideo(t);let n=e.timestamp;if(n<=this._lastFrameTimestamp&&(n=this._lastFrameTimestamp+10,Yt.debug(`[WebmBuilder] Fixup timestamp for participant [${this._participantId}]`)),this._lastFrameTimestamp=n,this._earliestTimestamp)n-=this._earliestTimestamp;else{if(!e.keyframe)return;this._earliestTimestamp=n,n=0}if(e.keyframe){this._clusterStartTime=n,this._mediaBuffer.cleanup(),Yt.debug(`[WebmBuilder] Segment header for participant [${this._participantId}]`);let r=Pt._genWebmHeader();this._mediaBuffer.append(r);let o=Pt._genSegmentHeader(e.width,e.height,t);this._mediaBuffer.append(o)}let r=Math.round(n-this._clusterStartTime);if(r>At&&(this._clusterStartTime=n,r=0),0===r){Yt.debug(`[WebmBuilder] Cluster header for participant [${this._participantId}]`);let e=Pt._genClusterHeader(this._clusterStartTime);this._mediaBuffer.append(e)}let o=d.element(d.ID.SimpleBlock,[d.vintEncodedNumber(1),d.bytes(Pt._intToU16BE(r)),d.number((e.keyframe?1:0)<<7),d.bytes(e.frameData)]);this._mediaBuffer.append(o,!0)}destroy(){super.destroy(),this._video&&(this._video.onpause=null,this._video.onwaiting=null,this._video.onstalled=null,this._video.onerror=null,this._video.pause(),this._video.src="",document.body.removeChild(this._video)),this._mediaBuffer&&(this._mediaBuffer.destroy(),this._mediaBuffer=null),this._stream&&(this._stream.getTracks().forEach((e=>e.stop())),this._stream=null),Yt.debug(`[WebmBuilder] destroyed for participant [${this._participantId}]`)}static isBrowserSupported(){var e,t,n;return"captureStream"in(null==(e=window.HTMLVideoElement)?void 0:e.prototype)&&(null==(t=window.MediaSource)?void 0:t.isTypeSupported('video/webm; codecs="vp8"'))&&(null==(n=window.MediaSource)?void 0:n.isTypeSupported('video/webm; codecs="vp9"'))}},Ot=class{constructor(e,t,n,r){this._participantIdRegistry=null,this._streamBuilders={},this._onStream=()=>{},this._onEos=()=>{},Yt.debug("ScreenCaptureReceiver started"),this._datachannel=e,this._participantIdRegistry=t,this._onStream=n,this._onEos=r,this._datachannel.onmessage=e=>this._onDataChannelMessage(e.data)}_onDataChannelMessage(e){var t,n;let r=function(e){let t=new DataView(e),n=t.getUint8(0),r=t.getUint16(1),o=t.getUint32(3),i=1===t.getUint8(7),a=t.getUint16(8),s=t.getUint8(10),c=!!(1&s),l=!!(2&s),u=!!(4&s),d=!!(8&s);if(1!==n)throw new Error(`Unexpected protocol version. Got ${n}, expected 1`);return{timestamp:o,start:c,end:l,keyframe:u,sequence:r,isVP9:i,ssrc:a,eos:d,data:e.slice(11)}}(e),o=null==(n=null==(t=this._participantIdRegistry)?void 0:t.getStreamDescription(r.ssrc))?void 0:n.participantId;if(!o)return void Yt.warn(`Participant id for ssrc ${r.ssrc} not found in registry`);if(r.eos)return this.close(o),void this._onEos(o);let i=this._streamBuilders[o];if(!i){let e=e=>this._onStream(o,e);i=Nt.screenShareWebmBuilder&&Pt.isBrowserSupported()?new Pt(o,e):new Tt(o,e),this._streamBuilders[o]=i}i.appendChunk(r)}close(e){let t=this._streamBuilders[e];t&&(t.destroy(),delete this._streamBuilders[e])}destroy(){this._datachannel.onbufferedamountlow=null,this._datachannel.onmessage=null,this._onStream=()=>{},Object.values(this._streamBuilders).forEach((e=>e.destroy())),this._streamBuilders={},this._participantIdRegistry=null,Yt.debug("ScreenCaptureReceiver destroyed")}static isBrowserSupported(){return(Re.isBrowserSupported()||ke.isBrowserSupported())&&(Tt.isBrowserSupported()||Pt.isBrowserSupported())}},It=class extends Ie{constructor(e,t){super(),this._video=null,this._imageCapture=null,this._canvas=null,this._canvasCtx=null,this._stream=null,this._track=null,this._frameReadTimeout=0,this._lastFrame=null,this._sourceTrack=e,this._onFrame=t,this._useImageCapture="ImageCapture"in window&&"ImageBitmap"in window,("live"!==e.readyState||!e.enabled||e.muted)&&(this._useImageCapture=!1)}_createDom(){this._canvas||(this._canvas=document.createElement("canvas"),this._canvas.style.pointerEvents="none",this._canvas.style.visibility="hidden",this._canvas.style.position="absolute",this._canvas.style.width="160px",this._canvas.style.height="90px",this._canvas.style.bottom="0",this._canvas.style.right="160px",this._canvas.style.zIndex="5000",this._canvasCtx=this._canvas.getContext("2d"),document.body.appendChild(this._canvas)),!this._video&&!this._useImageCapture&&(this._video=document.createElement("video"),this._video.controls=!1,this._video.autoplay=!1,this._video.preload="auto",this._video.muted=!0,this._video.style.pointerEvents="none",this._video.style.visibility="hidden",this._video.style.position="absolute",this._video.style.width="160px",this._video.style.height="90px",this._video.style.bottom="0",this._video.style.right="0",this._video.style.zIndex="5000",document.body.appendChild(this._video))}_removeDom(){try{this._canvas&&document.body.removeChild(this._canvas),this._video&&document.body.removeChild(this._video)}catch(e){}this._canvasCtx=null,this._canvas=null,this._video=null}_createStream(e){return y(this,null,(function*(){if(!this._canvas)throw new Error("Canvas not found");if(!this._video&&!this._useImageCapture)throw new Error("Video element not found");return this._stream=this._canvas.captureStream(0),this._track=this._stream.getVideoTracks()[0],new Promise(((t,n)=>{if(this._useImageCapture)this._imageCapture=new ImageCapture(e),t();else{let r=this._video;r.srcObject=new MediaStream([e]),r.onloadeddata=e=>t(),r.onerror=()=>n(new Error("Video element error"));let o=r.play(),i=()=>n(new Error("Autoplay is disabled"));o?o.catch(i):i()}}))}))}_removeStream(){var e;window.clearTimeout(this._frameReadTimeout),null==(e=this._lastFrame)||e.close(),this._stream&&(this._stream.getTracks().forEach((e=>e.stop())),this._stream=null,this._track=null),this._video&&(this._video.pause(),this._video.srcObject=null),this._imageCapture&&(this._imageCapture=null)}_drawFrameVideo(){if(!(this._canvas&&this._canvasCtx&&this._video&&this._track))throw new Error("Fatal error");let e=this._video.videoWidth,t=this._video.videoHeight;return this._canvas.width=this._video.width=e,this._canvas.height=this._video.height=t,this._canvasCtx.clearRect(0,0,e,t),this._canvasCtx.drawImage(this._video,0,0,e,t),this._requestCanvasFrame(),this._canvasCtx.getImageData(0,0,e,t)}_getFrameBitmap(){return y(this,null,(function*(){if(!this._imageCapture)throw new Error("Destroyed");return this._imageCapture.grabFrame()}))}_drawFrameData(e){var t;if(!this._canvas||!this._canvasCtx||!this._track)throw new Error("Destroyed");let n=e.width,r=e.height;return this._canvas.width=n,this._canvas.height=r,this._canvasCtx.clearRect(0,0,n,r),this._canvasCtx.drawImage(e,0,0,n,r),this._requestCanvasFrame(),null==(t=this._canvasCtx)?void 0:t.getImageData(0,0,n,r)}_requestCanvasFrame(){this._track&&this._track.requestFrame?this._track.requestFrame():this._stream&&this._stream.requestFrame&&this._stream.requestFrame()}init(){return y(this,null,(function*(){this._createDom();let e=this._sourceTrack.getSettings().width,t=this._sourceTrack.getSettings().height;Yt.debug(`LibVPxEncoder started ${e}x${t}, codec ${this.isVP9()?"VP9":"VP8"}`),yield this._createStream(this._sourceTrack),yield this._createWorker('var exports=(()=>{var u=Object.defineProperty;var b=o=>u(o,"__esModule",{value:!0});var g=(o,n)=>{b(o);for(var t in n)u(o,t,{get:n[t],enumerable:!0})};var y={};g(y,{default:()=>R});var e=(r=>(r.INIT="init",r.READY="ready",r.FRAME="frame",r.ERROR="error",r.DEBUG="debug",r.LOG_ERROR="log_error",r))(e||{});var R=(o,n)=>{let t;function m(a,r){return o({locateFile:n}).then(s=>{if(t=new s.VpxEncoder,t.debug(r),!t.init(a?s.VpxType.VP9:s.VpxType.VP8))throw self.postMessage({type:e.LOG_ERROR,message:"encoder-init-fail-libvpx"}),new Error("LibVPxEncoder failed to create");t.setMaxQuantizer(10),t.setTargetBitrate(1024)})}function E(a,r,s,i){let c=t.allocateImage(a,r);if(!c){self.postMessage({type:e.FRAME,error:"No buffer data"});return}c.set(new Uint8Array(s));let f=Math.round(performance.now()),l=150;if(!t.encode(f,l,i)){self.postMessage({type:e.FRAME,error:"Encode failed"});return}let p=t.readFrame();if(!p){self.postMessage({type:e.FRAME,error:"No encoded data"});return}t.readFrame()&&(self.postMessage({type:e.DEBUG,message:"LibVPxEncoder dropped frame"}),self.postMessage({type:e.LOG_ERROR,message:"LibVPxEncoder-drop"}));let d=new Uint8Array(p.byteLength);d.set(p),self.postMessage({type:e.FRAME,frameType:i?"key":"delta",timestamp:f,duration:l,data:d.buffer},[d.buffer])}self.onmessage=a=>{switch(a.data.type){case e.INIT:m(a.data.isVP9,a.data.debug).then(()=>self.postMessage({type:e.READY})).catch(r=>self.postMessage({type:e.ERROR,error:String(r)}));break;case e.FRAME:E(a.data.width,a.data.height,a.data.imageData,a.data.keyFrame);break}}};return y;})();\n',(e=>{var t;e.error?this._onFrame(null,e.error):this._onFrame({type:e.frameType,timestamp:e.timestamp,duration:e.duration,data:e.data,byteLength:null==(t=e.data)?void 0:t.byteLength})}),[s(),s().getUrl],{isVP9:this.isVP9(),debug:Yt.enabled()})}))}_encode(e,t){let n=e.data.buffer;this._sendToWorker(Pe.FRAME,{width:e.width,height:e.height,imageData:n,keyFrame:t},[n])}_requestFrameVideo(e){let t=this._drawFrameVideo();this._encode(t,e)}_requestFrameBitmap(e){this._frameReadTimeout=window.setTimeout((()=>{if(this._lastFrame){let t=this._drawFrameData(this._lastFrame);this._encode(t,e)}else this._onFrame(null)}),1e3),this._getFrameBitmap().then((t=>{var n;window.clearTimeout(this._frameReadTimeout),null==(n=this._lastFrame)||n.close(),this._lastFrame=t;let r=this._drawFrameData(t);this._encode(r,e)})).catch((()=>{}))}requestFrame(e=!1){this._useImageCapture?this._requestFrameBitmap(e):this._requestFrameVideo(e)}isVP9(){return!1}destroy(){this._removeWorker(),this._removeStream(),this._removeDom(),Yt.debug("LibVPxEncoder destroyed")}static isBrowserSupported(){return"WebAssembly"in window&&"Worker"in window&&("CanvasCaptureMediaStream"in window||"CanvasCaptureMediaStreamTrack"in window)}},kt=class extends Ie{constructor(e,t){super(),this._sourceTrack=e,this._onFrame=t,this._trackProcessor=new MediaStreamTrackProcessor(e)}init(){return y(this,null,(function*(){let e=this._sourceTrack.getSettings().width,t=this._sourceTrack.getSettings().height,n=this._trackProcessor.readable;Yt.debug(`WebCodecsEncoder started ${e}x${t}, codec ${this.isVP9()?"VP9":"VP8"}`),yield this._createWorker('var exports=(()=>{var b=Object.defineProperty;var g=i=>b(i,"__esModule",{value:!0});var F=(i,n)=>{g(i);for(var r in n)b(i,r,{get:n[r],enumerable:!0})};var A={};F(A,{default:()=>h});var l=(r=>(r.VP9="vp09.00.50.08",r.VP8="vp8",r))(l||{}),d=(t=>(t.INIT="init",t.READY="ready",t.FRAME="frame",t.ERROR="error",t.DEBUG="debug",t.LOG_ERROR="log_error",t))(d||{});var h=()=>{let i=1e3,n,r,c,s,f,t,a=null,p=0,u=!1;function V(e){n=e.readable,r=n.getReader(),c=e.width,s=e.height,f=e.isVP9,t=e.framerate,m.configure({framerate:t,codec:f?l.VP9:l.VP8,width:c,height:s,latencyMode:"realtime"}),self.postMessage({type:d.READY})}function y(e){p=self.setTimeout(()=>{a&&E(a,e)},i),!u&&(u=!0,r.read().finally(()=>{u=!1,self.clearTimeout(p)}).then(({done:o,value:R})=>{if(a==null||a.close(),a=null,!(o||!R)){if(!m){r.releaseLock(),n.cancel();return}a=R,E(R,e)}}))}function E(e,o){(e.codedWidth!==c||e.codedHeight!==s)&&(c=e.codedWidth,s=e.codedHeight,m.configure({framerate:t,codec:f?l.VP9:l.VP8,width:c,height:s,latencyMode:"realtime"})),m.encode(e,{keyFrame:o})}let m=new VideoEncoder({output:e=>{let o;e.data?o=e.data:(o=new ArrayBuffer(e.byteLength),e.copyTo(o)),self.postMessage({type:d.FRAME,frameType:e.type,timestamp:e.timestamp,duration:e.duration,data:o},[o])},error:e=>{self.postMessage({type:d.FRAME,error:String(e)})}});self.onmessage=e=>{switch(e.data.type){case d.INIT:V(e.data);break;case d.FRAME:y(e.data.keyFrame);break}}};return A;})();\n',(e=>{var t;e.error?this._onFrame(null,e.error):this._onFrame({type:e.frameType,timestamp:e.timestamp,duration:e.duration,data:e.data,byteLength:null==(t=e.data)?void 0:t.byteLength})}),[],{readable:n,width:e,height:t,isVP9:this.isVP9(),framerate:Nt.screenFrameRate},[n])}))}requestFrame(e=!1){this._sendToWorker(Pe.FRAME,{keyFrame:e})}isVP9(){return!0}destroy(){this._removeWorker(),Yt.debug("WebCodecsEncoder destroyed")}static isBrowserSupported(){return"VideoEncoder"in window&&"Worker"in window&&"EncodedVideoChunk"in window&&"MediaStreamTrackProcessor"in window}},Rt=0,Mt=class{constructor(e,t){this._destroyed=!1,this._needKeyframe=!0,Yt.debug("ScreenCaptureSender started"),this._datachannel=t;let n=(e,t)=>{if(!this._destroyed){if(!e)return Yt.warn("requestFrame failed, keyFrame: "+this._needKeyframe,t),this._needKeyframe=!0,void this._requestFrame();this._send(e).catch((e=>{Yt.warn("sendFrame failed",e),this._needKeyframe=!0})).finally((()=>this._requestFrame()))}};kt.isBrowserSupported()?this._encoder=new kt(e,n):this._encoder=new It(e,n),this._datachannel.onmessage=e=>{(function(e){if(!e||!e.byteLength||4!==e.byteLength)return!1;let t=new DataView(e);return!(1!==t.getUint8(0)||1!==t.getUint8(1)||0!==t.getUint16(2))})(e.data)&&(Yt.debug(`[${this._datachannel.label}] Requested keyframe`),this._needKeyframe=!0)},this._encoder.init().then((()=>this._requestFrame())).catch((e=>Yt.warn("ScreenCaptureSender init failed",e)))}_requestFrame(){this._destroyed||(this._encoder.requestFrame(this._needKeyframe),this._needKeyframe=!1)}_wrapHeader(e,t,n,r,o){let i=function(e,t,n,r,o,i,a){let s=0;t&&(s|=1),n&&(s|=2),r&&(s|=4),a||(s|=8);let c=new ArrayBuffer(11),l=new DataView(c);if(l.setUint8(0,1),l.setUint16(1,o),l.setUint32(3,e),l.setUint8(7,i?1:0),l.setUint16(8,0),l.setUint8(10,s),!a)return c;let u=new Uint8Array(c.byteLength+a.byteLength);return u.set(new Uint8Array(c),0),u.set(new Uint8Array(a),c.byteLength),u.buffer}(e,t,n,r,Rt,this._encoder.isVP9(),o);return Rt=(Rt+1)%65536,i}_stopPacket(){return this._wrapHeader(Date.now(),!1,!1,!1,null)}_send(e){return y(this,null,(function*(){return new Promise(((t,n)=>{this._sendChunk(e,0,t,n)}))}))}_sendChunk(e,t,n,r){if(!this._datachannel||"open"!==this._datachannel.readyState)return void r();let o=e.data.slice(t,t+16373),i=e.data.byteLength<=t+o.byteLength,a=this._wrapHeader(e.timestamp,!t,i,"key"===e.type,o);this._datachannel.onbufferedamountlow=i?()=>{this._datachannel.bufferedAmount<=this._datachannel.bufferedAmountLowThreshold&&n()}:null;try{this._datachannel.send(a)}catch(e){return Yt.warn("Error send data to DataChannel",e),void r()}i||window.setTimeout((()=>this._sendChunk(e,t+16373,n,r)),0)}destroy(){this._datachannel.onbufferedamountlow=null,this._datachannel.onmessage=null,"open"===this._datachannel.readyState&&this._datachannel.send(this._stopPacket()),this._destroyed=!0,this._encoder.destroy(),Yt.debug("ScreenCaptureSender destroyed")}static isBrowserSupported(){return kt.isBrowserSupported()||It.isBrowserSupported()}},Lt=class{static get sessionKey(){return Lt._sessionKey}static set sessionKey(e){Lt._sessionKey=e}static get sessionSecretKey(){return Lt._sessionSecretKey}static set sessionSecretKey(e){Lt._sessionSecretKey=e}static get accessToken(){return Lt._accessToken}static set accessToken(e){Lt._accessToken=e}static isEmpty(){return!Lt._sessionKey||!Lt._sessionSecretKey}},xt=class{static set(e){e.hasOwnProperty("voiceParams")&&(Object.assign(xt._params.voiceParams,e.voiceParams),delete e.voiceParams),e.hasOwnProperty("specListenerParams")&&(Object.assign(xt._params.specListenerParams,e.specListenerParams),delete e.specListenerParams),e.hasOwnProperty("unifiedPlanBrowsers")&&(Object.assign(xt._params.unifiedPlanBrowsers,e.unifiedPlanBrowsers),delete e.unifiedPlanBrowsers),e.hasOwnProperty("apiAuth")&&(Lt.accessToken=e.apiAuth.accessToken,Lt.sessionKey=e.apiAuth.sessionKey,Lt.sessionSecretKey=e.apiAuth.sessionSecretKey),Object.assign(xt._params,e)}static get(e){return xt._params[e]}static get appName(){return"ok.calls.sdk.js"}static get appVersion(){return 1.1}static get sdkVersion(){return"2.5.2-beta.9"}static get debug(){}static get protocolVersion(){return xt._params.joinFromMultipleDevices?6:5}static get platform(){return xt._params.platform}static set platform(e){xt._params.platform=e}static get clientType(){return xt._params.clientType}static set clientType(e){xt._params.clientType=e}static get device(){return xt._params.device}static get apiKey(){return xt._params.apiKey}static get apiEnv(){return xt._params.apiEnv}static get apiEndpoint(){switch(xt.apiEnv){case"AUTO":case"PROD":return"https://api.mycdn.me";case"PROD_OK":return"https://api.ok.ru";case"TEST":return"https://apitest.ok.ru/api";case"VIDEOTEST":return"https://videotestapi.ok.ru/api";default:return xt._params.apiEnv}}static get authToken(){return xt._params.authToken}static set authToken(e){xt._params.authToken=e}static get anonymToken(){return xt._params.anonymToken}static set anonymToken(e){xt._params.anonymToken=e}static get domain(){return xt._params.domain}static get iceServers(){return xt._params.iceServers}static set iceServers(e){xt._params.iceServers=e}static get wssBase(){return xt._params.wssBase}static set wssBase(e){xt._params.wssBase=e}static get wssToken(){return xt._params.wssToken}static set wssToken(e){xt._params.wssToken=e}static get signalingReconnectDelay(){return xt._params.signalingReconnectDelay}static get signalingReconnectMaxDelay(){return xt._params.signalingReconnectMaxDelay}static get signalingReconnectMaxCount(){return xt._params.signalingReconnectMaxCount}static get waitConnectionDelay(){return xt._params.waitConnectionDelay}static get waitResponseDelay(){return xt._params.waitResponseDelay}static get waitMessageDelay(){return xt._params.waitMessageDelay}static get debugLog(){return xt._params.debugLog}static get forceRelayPolicy(){return xt._params.forceRelayPolicy}static set forceRelayPolicy(e){xt._params.forceRelayPolicy=e}static get videoMinWidth(){return xt._params.videoMinWidth}static get videoMaxWidth(){return xt._params.videoMaxWidth}static set videoMaxWidth(e){xt._params.videoMaxWidth=e}static get videoMinHeight(){return xt._params.videoMinHeight}static get videoMaxHeight(){return xt._params.videoMaxHeight}static set videoMaxHeight(e){xt._params.videoMaxHeight=e}static get videoAspectRatio(){return xt._params.videoAspectRatio}static get videoFrameRate(){return xt._params.videoFrameRate}static get videoFacingMode(){return xt._params.videoFacingMode}static get screenFrameRate(){return xt._params.screenFrameRate}static get videoEffects(){return xt._params.videoEffects}static set videoEffects(e){xt._params.videoEffects=e}static get videoEffectMaxWidth(){return xt._params.videoEffectMaxWidth}static set videoEffectMaxWidth(e){xt._params.videoEffectMaxWidth=e}static get videoEffectMaxHeight(){return xt._params.videoEffectMaxHeight}static set videoEffectMaxHeight(e){xt._params.videoEffectMaxHeight=e}static get voiceParams(){return xt._params.voiceParams}static get specListenerParams(){return xt._params.specListenerParams}static get iceRestartWaitTime(){return xt._params.iceRestartWaitTime}static get transportConnectionWaitTime(){return xt._params.transportConnectionWaitTime}static get statisticsInterval(){return xt._params.statisticsInterval}static set statisticsInterval(e){xt._params.statisticsInterval=e}static get networkStatisticsInterval(){return xt._params.networkStatisticsInterval}static get perfStatReportEnabled(){return xt._params.perfStatReportEnabled}static get callStatReportEnabled(){return xt._params.callStatReportEnabled}static get producerNotificationDataChannel(){return xt._params.producerNotificationDataChannel&&Ot.isBrowserSupported()}static get producerCommandDataChannel(){return xt._params.producerCommandDataChannel}static get consumerScreenDataChannel(){return xt._params.consumerScreenDataChannel&&Mt.isBrowserSupported()}static get producerScreenDataChannel(){return xt._params.producerScreenDataChannel&&xt.producerNotificationDataChannel}static get screenShareWebmBuilder(){return xt._params.screenShareWebmBuilder}static get noiseSuppression(){return xt._params.noiseSuppression}static set noiseSuppression(e){xt._params.noiseSuppression=e}static get preferH264(){return xt._params.preferH264}static get preferVP9(){return xt._params.preferVP9}static get audioNack(){return xt._params.audioNack}static get consumerScreenTrack(){return xt._params.consumerScreenTrack&&xt.consumerScreenDataChannel}static get producerScreenTrack(){return xt._params.producerScreenTrack&&xt.producerScreenDataChannel}static isUnifiedPlanSupported(e,t){let n=xt._params.unifiedPlanBrowsers;return!!n.hasOwnProperty(e)&&t>=n[e]}static get movieShare(){return xt._params.movieShare&&xt.videoTracksCount>0}static get videoTracksCount(){return xt.producerNotificationDataChannel?xt._params.videoTracksCount:0}static get breakVideoPayloadTypes(){return xt._params.breakVideoPayloadTypes}static get filteredMessages(){return xt._params.filteredMessages}static get batchParticipantsOnStart(){return xt._params.batchParticipantsOnStart}static get participantStateMapped(){return xt._params.participantStateMapped}},Nt=xt;Nt._params={platform:"WEB",clientType:"PORTAL",device:"browser",apiKey:"",authToken:"",anonymToken:"",apiEnv:"AUTO",domain:"",iceServers:[],wssBase:"",wssToken:"",signalingReconnectDelay:1e3,signalingReconnectMaxDelay:5e3,signalingReconnectMaxCount:20,waitConnectionDelay:1e4,waitResponseDelay:1e4,waitMessageDelay:15e3,debugLog:!1,forceRelayPolicy:!1,videoMinWidth:428,videoMinHeight:240,videoMaxWidth:1280,videoMaxHeight:720,videoAspectRatio:16/9,videoFrameRate:25,screenFrameRate:15,videoEffects:null,videoEffectMaxWidth:640,videoEffectMaxHeight:360,iceRestartWaitTime:2e4,transportConnectionWaitTime:5e3,statisticsInterval:5e3,networkStatisticsInterval:2e4,perfStatReportEnabled:!0,callStatReportEnabled:!1,voiceParams:{smoothing:.8,minFreq:200,maxFreq:5e3,interval:500,threshold:.35,speakerLevelMultiplier:1.8},specListenerParams:{connectionTimeout:1e4,volumeTimeout:1e4},unifiedPlanBrowsers:{Firefox:10,Chrome:76,Safari:12},producerNotificationDataChannel:!0,producerCommandDataChannel:!0,consumerScreenDataChannel:!0,producerScreenDataChannel:!0,screenShareWebmBuilder:!1,noiseSuppression:!0,preferH264:!1,preferVP9:!0,audioNack:!0,consumerScreenTrack:!1,producerScreenTrack:!1,videoTracksCount:0,movieShare:!1,filteredMessages:!1,breakVideoPayloadTypes:!1,batchParticipantsOnStart:!1,participantStateMapped:!1,joinFromMultipleDevices:!0};var Bt,Ut,Ft=((Bt=Ft||{}).WAITING_HALL="WAITING_HALL",Bt.WAITING="WAITING",Bt.CONNECTING="CONNECTING",Bt.CONNECTED="CONNECTED",Bt.RECONNECT="RECONNECT",Bt.ERROR="ERROR",Bt.HANGUP="HANGUP",Bt.PERMISSIONS="PERMISSIONS",Bt);function Wt(e,...t){let n=Nt.get(e);n&&setTimeout(n,0,...t)}function Vt(e){return Object.assign({},e)}function Ht(e){return e.slice()}(e=>{e.onLocalStream=function(e,t){Wt("onLocalStream",e,Vt(t))},e.onScreenStream=function(e,t){Wt("onScreenStream",e,Vt(t))},e.onLocalStreamUpdate=function(e,t){Wt("onLocalStreamUpdate",Vt(e),t)},e.onLocalStatus=function(e){Wt("onLocalStatus",e)},e.onRemoteStream=function(e,t){Wt("onRemoteStream",e,t)},e.onRemoteLive=function(e,t,n){Wt("onRemoteLive",e,t,n)},e.onRemoteScreenStream=function(e,t){Wt("onRemoteScreenStream",e,t)},e.onConversation=function(e,t,n,r){Wt("onConversation",e,Vt(t),Vt(n),r)},e.onRemoteMediaSettings=function(e,t){Wt("onRemoteMediaSettings",e,Vt(t))},e.onRemoteParticipantState=function(e,t){Wt("onRemoteParticipantState",e,Vt(t))},e.onRemoteStatus=function(e,t,n=null){Wt("onRemoteStatus",e,t,n)},e.onParticipantStatus=function(e,t,n=null){Wt("onParticipantStatus",e,t,n)},e.onPermissionsRequested=function(){Wt("onPermissionsRequested")},e.onPermissionsError=function(e){Wt("onPermissionsError",e)},e.onRemoteRemoved=function(e){Wt("onRemoteRemoved",e)},e.onCallState=function(e,t,n){Wt("onCallState",e,t,Vt(n))},e.onDeviceSwitched=function(e,t){Wt("onDeviceSwitched",e,t)},e.onMuteStates=function(e,t,n,r=!1,o=!1,i=null,a=null){Wt("onMuteStates",Vt(e),Ht(t),Ht(n),r,o,i,a)},e.onRolesChanged=function(e,t){Wt("onRolesChanged",e,Ht(t))},e.onLocalRolesChanged=function(e){Wt("onLocalRolesChanged",Ht(e))},e.onPinnedParticipant=function(e,t){Wt("onPinnedParticipant",e,t)},e.onLocalPin=function(e){Wt("onLocalPin",e)},e.onOptionsChanged=function(e){Wt("onOptionsChanged",Ht(e))},e.onCallAccepted=function(){Wt("onCallAccepted")},e.onRateNeeded=function(){Wt("onRateNeeded")},e.onSpeakerChanged=function(e){Wt("onSpeakerChanged",e)},e.onVolumesDetected=function(e){Wt("onVolumesDetected",Ht(e))},e.onLocalVolume=function(e,t){Wt("onLocalVolume",e,t)},e.onJoinStatus=function(e,t){Wt("onJoinStatus",e,t)},e.onHangup=function(e,t){Wt("onHangup",e,t)},e.onMultipartyChatCreated=function(e){Wt("onMultipartyChatCreated",Vt(e))},e.onDeviceChange=function(){Wt("onDeviceChange")},e.onFingerprintChange=function(e){Wt("onFingerprintChange",e)},e.onTokenExpired=function(){Wt("onTokenExpired")},e.onChatMessage=function(e,t,n=!1){Wt("onChatMessage",e,t,n)},e.onCustomData=function(e,t,n=!1){Wt("onCustomData",e,t,n)},e.onRecordStarted=function(e,t,n,r,o,i){Wt("onRecordStarted",e,t,n,r,o,i)},e.onRecordStopped=function(){Wt("onRecordStopped")},e.onLocalNetworkStatusChanged=function(e){Wt("onLocalNetworkStatusChanged",e)},e.onNetworkStatusChanged=function(e){Wt("onNetworkStatusChanged",e)},e.onDebugMessage=function(e,...t){Wt("onDebugMessage",e,...t)},e.onStatistics=function(e,t){Wt("onStatistics",Object.assign({},e,{memory:t}))},e.onAutoplayError=function(){Wt("onAutoplayError")},e.onChatRoomUpdated=function(e,t,n){Wt("onChatRoomUpdated",e,t,n)}})(Ut||(Ut={}));var jt,Kt=Ut,zt=(e=>(e.DEBUG="DEBUG",e.LOG="LOG",e.WARN="WARN",e.ERROR="ERROR",e))(zt||{});(e=>{let t="📞",n=(e,...t)=>{Kt.onDebugMessage(e,...t)},r=!1,o=(e,t)=>(...n)=>{e(...n),function(e,t){!be.available||(Ce.push({t:Date.now(),l:e,d:t}),Te||(Te=window.setTimeout((()=>{Te=null,ye()}),3e4)))}(t,n)},i=console.debug.bind(console,t),a=console.log.bind(console,t),s=console.warn.bind(console,t),c=console.error.bind(console,t),l=n.bind(null,"DEBUG"),u=n.bind(null,"LOG"),d=n.bind(null,"WARN"),_=n.bind(null,"ERROR");e.debug=l,e.log=u,e.warn=d,e.error=_,e.enabled=function(){return r},e.toggle=function(t){r=t,Nt.debugLog&&we(),t?(e.debug=Nt.debugLog?o(i,"DEBUG"):i,e.log=Nt.debugLog?o(a,"LOG"):a,e.warn=Nt.debugLog?o(s,"WARN"):s,e.error=Nt.debugLog?o(c,"ERROR"):c):(e.debug=Nt.debugLog?o(l,"DEBUG"):l,e.log=Nt.debugLog?o(u,"LOG"):u,e.warn=Nt.debugLog?o(d,"WARN"):d,e.error=Nt.debugLog?o(_,"ERROR"):_)},e.send=function(t,...n){switch(t){case"DEBUG":e.debug(...n);break;case"LOG":e.log(...n);break;case"WARN":e.warn(...n);break;case"ERROR":e.error(...n)}}})(jt||(jt={}));var Gt,qt,Yt=jt,$t=(e=>(e.USER="USER",e.ANONYM="ANONYM",e.GROUP="GROUP",e))($t||{});(e=>{function t(e,t="USER"){return{id:e,type:t}}function n(e){return`{"id":"${e.id}","type":"${e.type}"}`}e.fromIds=function(e){return e.length?"object"==typeof e[0]?e:e.map((e=>t(e))):[]},e.fromId=t,e.fromSignaling=function(e){return{id:e.id,type:"ANONYM"===e.type?"ANONYM":"USER"}},e.toString=n,e.fromIdToString=function(e,r="USER"){return n(t(e,r))},e.fromString=function(e){try{return JSON.parse(e)}catch(t){throw new Error(`Failed to parse ExternalId from string '${e}'`)}},e.compare=function(e,t){return e.id===t.id&&e.type===t.type}})(Gt||(Gt={})),(e=>{e.fromId=function(e,t="USER",n=0){return{id:e,type:t,deviceIdx:n}},e.toString=function(e){return`{"id":"${e.id}","type":"${e.type}","deviceIdx":"${e.deviceIdx}"}`},e.fromSignaling=function(e,t){return Object.assign({deviceIdx:t},Gt.fromSignaling(e))},e.getDeviceIdx=function(e){return e&&"object"==typeof e?e.deviceIdx:0}})(qt||(qt={}));var Xt=(e=>(e.CAMERA="CAMERA",e.SCREEN="SCREEN",e.STREAM="STREAM",e.MOVIE="MOVIE",e))(Xt||{});function Qt(e){return e.participantId+(e.mediaType?":s"+e.mediaType:"")+(e.streamName?":m"+e.streamName:"")}function Jt(e){let t=e.split(ze),n=t.shift();if(!n)throw new Error("Illegal stream description: "+e);let r,o=null,i=0;for(let n of t)switch(n.charAt(0)){case"s":o=Zt(n.slice(1));break;case"m":r=n.slice(1);break;case"d":i=Number.parseInt(n.slice(1),10);break;default:throw new Error("Unexpected parameter type "+n.charAt(0)+" in stream description "+e)}return{participantId:Xe.compose(n,i),mediaType:o,streamName:r}}function Zt(e){for(let t of Object.keys(Xt))if(t===e)return Xt[t];return null}function en(e,t){return null===e||null===t?null===e&&null===t:!(e.maxDimension!==t.maxDimension||e.maxBitrateK!==t.maxBitrateK||e.maxFramerate!==t.maxFramerate||e.degradationPreference!==t.degradationPreference)}function tn(e,t){return!(!en(e.camera,t.camera)||!en(e.screenSharing,t.screenSharing))}function nn(e,t){return{camera:Object.assign({},e.camera,t.camera),screenSharing:Object.assign({},e.screenSharing,t.screenSharing)}}var rn=class{constructor(e){this._fixNoPacketsApplied=!1,this._fixNoPacketsChecked=!1,this._fixTooManyPacketsApplied=!1,this._fixTooManyPacketsSucceeded=!1,this._fixTooManyPacketsFailed=!1,this._mediaSource=e}_fixAudioDeviceNoPackets(e){if(!this._fixNoPacketsApplied||!this._fixNoPacketsChecked){if(this._fixNoPacketsApplied&&!this._fixNoPacketsChecked)return this._fixNoPacketsChecked=!0,void Oe.log(ne.ERROR,"audio_device_recover_"+(e.bandwidth?"success":"fail"));!this._fixNoPacketsApplied&&!e.bandwidth&&(this._fixNoPacketsApplied=!0,Oe.log(ne.ERROR,"audio_device_recover"),this._mediaSource.toggleAudio(!0))}}_fixAudioDeviceTooManyPackets(e){if(this._fixTooManyPacketsSucceeded||this._fixTooManyPacketsFailed)return;let t=Date.now();if(this._lastPacketsSentTime){if(t-this._lastPacketsSentTime>500){let n=1e3*(e.packetsSent-this._lastPacketsSent)/(t-this._lastPacketsSentTime);this._lastPacketsSentTime=t,this._lastPacketsSent=e.packetsSent,this._fixTooManyPacketsApplied?n>75?(Yt.log("Failed to fix RV"),Oe.log(ne.ERROR,"audio_device_recover_rv_fail"),this._fixTooManyPacketsFailed=!0):t-this._fixTooManyPacketsTime>6e4&&(Yt.log("Fixed RV"),Oe.log(ne.ERROR,"audio_device_recover_rv_success"),this._fixTooManyPacketsSucceeded=!0):n>75&&(this._fixTooManyPacketsApplied=!0,Yt.log("Trying to fix RV"),this._mediaSource.toggleAudio(!0),this._fixTooManyPacketsTime=t)}}else e.packetsSent>0&&(this._lastPacketsSentTime=t,this._lastPacketsSent=e.packetsSent)}fix(e){if(!this._mediaSource)return;let t=e.find((e=>e.kind===je.audio));!t||(this._fixAudioDeviceNoPackets(t),this._fixAudioDeviceTooManyPackets(t))}},on=class extends b{constructor(){super(...arguments),this._lastMemoryStat={percent:0,bytes:0}}onRemoteDataStats(e,t){this._calcMemory(),e.inbound.rtps.map((e=>{let n="string"==typeof e.userId&&t[e.userId]||null;e.userId=null==n?void 0:n.externalId})),Kt.onStatistics(e,this._lastMemoryStat)}_calcMemory(){var e;let t=null==(e=null==window?void 0:window.performance)?void 0:e.memory;if(!t||!t.usedJSHeapSize||!t.jsHeapSizeLimit)return;let n=Number((100*t.usedJSHeapSize/t.jsHeapSizeLimit).toFixed(2)),r=Number((t.usedJSHeapSize/1024/1024).toFixed(1));n>90?Yt.warn(`High memory usage: ${n}% (${r} MiB)`):(!this._lastMemoryStat.percent||Math.abs(n-this._lastMemoryStat.percent)>=3)&&(Yt.debug(`Memory usage: ${n}% (${r} MiB)`),this._lastMemoryStat.percent=n,this._lastMemoryStat.bytes=t.usedJSHeapSize)}},an=class{constructor(e,t){this._analyser=null,this._gainNode=null,this._fftBins=null,this._mediaStreamSource=null,this._lastSmoothedLevel=0,this._trackId=e,this._stream=t;try{let e=Ct.getAudioContext();this._gainNode=e.createGain(),this._gainNode.gain.value=1e-5,this._gainNode.connect(e.destination),this._analyser=e.createAnalyser(),this._analyser.fftSize=1024,this._analyser.smoothingTimeConstant=0,this._analyser.connect(this._gainNode),this._fftBins=new Uint8Array(this._analyser.frequencyBinCount),this._mediaStreamSource=e.createMediaStreamSource(t),this._mediaStreamSource.connect(this._analyser)}catch(e){}}get stream(){return this._stream}get trackId(){return this._trackId}_getBins(){if(!this._fftBins||!this._analyser)return new Uint8Array;this._analyser.getByteFrequencyData(this._fftBins);let e=44100/this._fftBins.length,t=Math.ceil(Nt.voiceParams.minFreq/e),n=Math.floor(Nt.voiceParams.maxFreq/e);return this._fftBins.subarray(t,n)}getLevel(){let e=this._getBins(),t=e.reduce(((e,t)=>e+t),0)/e.length/255,n=this._lastSmoothedLevel*Nt.voiceParams.smoothing+t*(1-Nt.voiceParams.smoothing);return this._lastSmoothedLevel=n,{real:t,smoothed:n}}destroy(){this._mediaStreamSource&&(this._mediaStreamSource.disconnect(),this._mediaStreamSource=null),this._gainNode&&(this._gainNode.disconnect(),this._gainNode=null),this._analyser&&(this._analyser.disconnect(),this._analyser=null,this._fftBins=null,this._lastSmoothedLevel=0)}},sn=class extends b{constructor(e){super(),this._detector=null,this._track=null,this._interval=null;let t=()=>{this._detector&&Kt.onLocalVolume(this._detector.getLevel().real,e.getMediaSettings().isAudioEnabled),this._interval=window.setTimeout(t,Nt.voiceParams.interval)};this._interval=window.setTimeout(t,Nt.voiceParams.interval);let n=()=>{let t=e.getStream();t&&this.init(t)};this.subscribe(e,He.SOURCE_CHANGED,(e=>{e.kind===je.audio&&e.mediaSettings.isAudioEnabled&&n()})),n()}init(e){this._stopDetector();let t=e.getAudioTracks();t.length&&(this._track=t[0].clone(),this._detector=new an("local",new MediaStream([this._track])))}_stopDetector(){this._detector&&(this._detector.destroy(),this._detector=null),this._track&&(this._track.stop(),this._track=null)}destroy(){this.unsubscribe(),this._interval&&(window.clearTimeout(this._interval),this._interval=null),this._stopDetector()}},cn="videochat-epi",ln=class extends b{constructor(e,t,n=!1){super(),this._previousTimestamp=0,this._previousCallStatReportTimestamp=0,this._previousCallStatReport={nack_sent:0,nack_received:0,pli_sent:0,pli_received:0,fir_sent:0,fir_received:0,frames_dropped:0,jitter_video:0,jitter_audio:0,interframe_delay_variance:0,total_audio_samples_received:0,concealed_audio_samples:0,inserted_audio_samples_for_deceleration:0,removed_audio_samples_for_acceleration:0,silent_concealed_audio_samples:0,audio_concealment_events:0,total_audio_energy:0},this._signaling=t,this._directTopology=n,this.subscribe(e,On.REMOTE_DATA_STATS,this._handleStats.bind(this))}destroy(){this.unsubscribe()}static getEstimatedPerformanceIndex(){try{let e=parseInt(localStorage.getItem(cn)||"",10);return isNaN(e)?0:e}catch(e){return 0}}_handleStats(e){return y(this,null,(function*(){if(!e.inbound||!e.inbound.rtps)return;let t=Date.now();!this._directTopology&&Nt.perfStatReportEnabled&&this._previousTimestamp+5e3<=t&&(yield this.reportPerfStats(e),this._previousTimestamp=t),Nt.callStatReportEnabled&&this._previousCallStatReportTimestamp+3e4<=t&&(this._reportCallStats(e),this._previousCallStatReportTimestamp=t)}))}reportPerfStats(e){return y(this,null,(function*(){let t=e.inbound.rtps.reduce(((e,t)=>("video"===t.kind&&(e.framesDecoded+=t.framesDecoded||0,e.framesReceived+=t.framesReceived||0),e)),{framesDecoded:0,framesReceived:0});if(t.framesDecoded)try{let e=yield this._signaling.reportPerfStat(t);localStorage.setItem(cn,e.estimatedPerformanceIndex)}catch(e){}}))}_reportCallStats(e){let t={nack_received:0,pli_received:0,fir_received:0,frames_dropped:0,jitter_video:0,jitter_audio:0,interframe_delay_variance:0,nack_sent:0,pli_sent:0,fir_sent:0,total_audio_samples_received:0,concealed_audio_samples:0,silent_concealed_audio_samples:0,inserted_audio_samples_for_deceleration:0,removed_audio_samples_for_acceleration:0,audio_concealment_events:0,total_audio_energy:0,inbound_video_count:0,inbound_audio_count:0};e.inbound.rtps.reduce(((e,t)=>("video"===t.kind?(t.framesReceived&&(e.jitter_video=e.jitter_video*e.inbound_video_count/(e.inbound_video_count+1)+1e3*t.jitter/(e.inbound_video_count+1),e.interframe_delay_variance=e.interframe_delay_variance*e.inbound_video_count/(e.inbound_video_count+1)+1e6*t.interframeDelayVariance/(e.inbound_video_count+1),e.inbound_video_count++),e.frames_dropped+=t.framesDropped,e.nack_sent+=t.nackCount,e.pli_sent+=t.pliCount,e.fir_sent+=t.firCount):(t.totalSamplesReceived&&(e.jitter_audio=e.jitter_audio*e.inbound_audio_count/(e.inbound_audio_count+1)+1e3*t.jitter/(e.inbound_audio_count+1),e.total_audio_energy=e.total_audio_energy*e.inbound_audio_count/(e.inbound_audio_count+1)+t.totalAudioEnergy/(e.inbound_audio_count+1),e.inbound_audio_count++),e.total_audio_samples_received+=t.totalSamplesReceived,e.inserted_audio_samples_for_deceleration+=t.insertedSamplesForDeceleration,e.removed_audio_samples_for_acceleration+=t.removedSamplesForAcceleration,e.concealed_audio_samples+=t.concealedSamples,e.silent_concealed_audio_samples+=t.silentConcealedSamples,e.audio_concealment_events+=t.concealmentEvents),e)),t),e.outbound.rtps.reduce(((e,t)=>("video"===t.kind&&(e.nack_received+=t.nackCount,e.pli_received+=t.pliCount,e.fir_received+=t.firCount),e)),t);let n={call_topology:this._directTopology?"D":"S",nack_sent:t.nack_sent-this._previousCallStatReport.nack_sent,nack_received:t.nack_received-this._previousCallStatReport.nack_received,pli_sent:t.pli_sent-this._previousCallStatReport.pli_sent,pli_received:t.pli_received-this._previousCallStatReport.pli_received,fir_sent:t.fir_sent-this._previousCallStatReport.fir_sent,fir_received:t.fir_received-this._previousCallStatReport.fir_received,frames_dropped:t.frames_dropped-this._previousCallStatReport.frames_dropped};if(t.jitter_video&&(n.jitter_video=t.jitter_video),t.jitter_audio&&(n.jitter_audio=t.jitter_audio),t.interframe_delay_variance&&(n.interframe_delay_variance=t.interframe_delay_variance),t.total_audio_samples_received){let e=t.total_audio_samples_received-this._previousCallStatReport.total_audio_samples_received,r=t.inserted_audio_samples_for_deceleration-this._previousCallStatReport.inserted_audio_samples_for_deceleration,o=t.removed_audio_samples_for_acceleration-this._previousCallStatReport.removed_audio_samples_for_acceleration,i=t.concealed_audio_samples-this._previousCallStatReport.concealed_audio_samples,a=t.silent_concealed_audio_samples-this._previousCallStatReport.silent_concealed_audio_samples,s=t.audio_concealment_events-this._previousCallStatReport.audio_concealment_events;n.inserted_audio_samples_for_deceleration=r/e*1e3,n.removed_audio_samples_for_acceleration=o/e*1e3,n.concealed_audio_samples=i/e*1e3,n.concealed_silent_audio_samples=a/e*1e3,n.concealment_audio_avg_size=i/s,n.total_audio_energy=t.total_audio_energy}Oe.logCustom("callStat",n),Yt.log("Sent call stats",n),this._previousCallStatReport=t}};function un(e,t,n=0){return t in e&&e[t]?e[t]:n}function dn(...e){return t=>{for(let n of e)if(n(t))return!0;return!1}}function _n(e,t){return n=>n[e]===t}function pn(e,t){return t.reduce(((t,n)=>(t[n[e]]=n,t)),{})}function hn(e){let t={},n=[];for(let r of e)t[r.id]||(t[r.id]=!0,n.push(r));return n}function fn(e){return Object.keys(e).filter((t=>void 0!==e[t])).map((t=>[t,e[t]])).reduce(((e,t)=>(e[t[0]]=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}(t[1])?fn(t[1]):t[1],e)),{})}function mn(e){let t=[];for(let n of e)n.forEach((e=>t.push(e)));return t}function vn(e){return y(this,null,(function*(){let t=[];return RTCRtpReceiver.prototype.getStats?(t.push(...e.getReceivers().map((e=>e.getStats()))),t.push(...e.getSenders().map((e=>e.getStats())))):t.push(e.getStats()),Promise.all(t).then(mn).then(hn)}))}function gn(e){let t=e.filter(_n("type","candidate-pair")).sort(function(e){return(t,n)=>t[e]-n[e]}("priority")).find(dn(_n("nominated",!0),_n("selected",!0)));if(!t)return{totalRoundTripTime:0,currentRoundTripTime:0,bytesSent:0,bytesReceived:0};let n={totalRoundTripTime:t.totalRoundTripTime||0,currentRoundTripTime:t.currentRoundTripTime||0,bytesSent:t.bytesSent,bytesReceived:t.bytesReceived},r=e.find(_n("id",t.remoteCandidateId));r&&(n=Object.assign({},n,{remote:{type:r.candidateType,address:r.ip||r.address,port:r.port,protocol:r.protocol}}));let o=e.find(_n("id",t.localCandidateId));return o&&(n=Object.assign({},n,{local:{type:o.candidateType,address:o.ip||o.address,port:o.port,protocol:o.protocol,relayProtocol:o.relayProtocol,networkType:o.networkType}})),fn(n)}function yn(e,t){let n=pn("id",e),r=e.filter(dn(_n("type","inbound-rtp"),_n("type","outbound-rtp")));"Firefox"===Ct.browserName()&&(r=Object.values(r.reduce(((e,t)=>{if(e[t.ssrc]){let n=Object.assign({},e[t.ssrc],t),r=e[t.ssrc].isRemote?t:e[t.ssrc];n.id=r.id,n.type=r.type,delete n.isRemote,delete n.remoteId,e[n.ssrc]=n}else e[t.ssrc]=t;return e}),{})));let o={};if("Safari"===Ct.browserName()){let t=e.filter(_n("type","track"));o=pn("trackIdentifier",t)}return r.map((e=>{let r=Number(e.ssrc),i=e.mediaType||e.kind,a=e.trackId,s=e.type,c=e.codecId;if("Safari"===Ct.browserName()){let n=/^.+_([\d]+)$/.exec(e.id);if(n&&(r=parseInt(n[1],10)),i=e.id.indexOf("Audio")>0?"audio":"video",t[r]){let e=i+"-"+t[r];o[e]&&(a=o[e].id)}}if(!s||!r||!i)return null;let l={ssrc:r,type:s,kind:i,bytesReceived:un(e,"bytesReceived"),bytesSent:un(e,"bytesSent"),jitter:un(e,"jitter"),packetsLost:un(e,"packetsLost"),packetsReceived:un(e,"packetsReceived"),packetsSent:un(e,"packetsSent"),fractionLost:un(e,"fractionLost"),pliCount:un(e,"pliCount"),firCount:un(e,"firCount"),nackCount:un(e,"nackCount"),userId:t[r]};if("video"===i){let t=un(e,"framesDecoded"),n=un(e,"totalInterFrameDelay"),r=un(e,"totalSquaredInterFrameDelay");l.interframeDelayVariance=(r-n*n/t)/t}if("audio"===i&&(l.totalSamplesReceived=un(e,"totalSamplesReceived"),l.concealedSamples=un(e,"concealedSamples"),l.insertedSamplesForDeceleration=un(e,"insertedSamplesForDeceleration"),l.removedSamplesForAcceleration=un(e,"removedSamplesForAcceleration"),l.silentConcealedSamples=un(e,"silentConcealedSamples"),l.concealmentEvents=un(e,"concealmentEvents"),l.totalAudioEnergy=un(e,"totalAudioEnergy")),c&&n[c]){let e=n[c];l.clockRate=e.clockRate,l.mimeType=e.mimeType}if(a&&n[a]){let e=n[a];l.frameHeight=e.frameHeight,l.frameWidth=e.frameWidth,l.framesDecoded=e.framesDecoded,l.framesReceived=e.framesReceived,l.framesDropped=e.framesDropped}return fn(l)})).filter((e=>!!e))}function En(e,t){if(!t||!t.rtps||!e.rtps)return e;let n=pn("ssrc",e.rtps),r=pn("ssrc",t.rtps),o=(e.timestamp-t.timestamp)/1e3;return!n||!r||Object.keys(n).forEach((e=>{let t=n[e],i=r[e];if(t&&i){if(t.bytesReceived&&t.bytesReceived>i.bytesReceived&&(t.bandwidth=Math.round((t.bytesReceived-i.bytesReceived)/o)),t.bytesSent&&t.bytesSent>i.bytesSent&&(t.bandwidth=Math.round((t.bytesSent-i.bytesSent)/o)),t.packetsReceived)if(t.packetsReceived>i.packetsReceived||t.packetsLost>i.packetsLost){let e=t.packetsLost-i.packetsLost,n=t.packetsReceived-i.packetsReceived;t.packetLoss=parseFloat((100*e/(e+n)).toFixed(2))}else t.packetLoss=0;t.framesDropped&&i.framesDropped&&t.framesDropped>i.framesDropped&&(t.framesDroppedDelta=parseFloat(((t.framesDropped-i.framesDropped)/o).toFixed(0)))}})),e}function wn(e,t){return y(this,arguments,(function*(e,t,n={}){let r=yield vn(e),o={timestamp:Date.now(),transport:gn(r),rtps:yn(r,n)};return t?En(o,t):(yield Xe.delay(1e3),wn(e,o,n))}))}var bn,Cn,Sn=.8,Tn=class extends b{constructor(e,t,n,r,o){if(super(),this._remoteSDP={},this._remoteCandidates={},this._state=In.IDLE,this._isOpen=!1,this._remotePeerId=null,this._statInterval=null,this._settingsInterval=null,this._failedOnCreate=null,this._remoteStream=null,this._iceRestartTimeout=null,this._reconnectionTimeout=null,this._reconnectionPrevented=!1,this._fingerprint=null,this._neverConnected=!0,this._prevConsumerSettings={},this._lastNetworkStat={rtt:0,loss:0,date:0},this._remoteNetworkStat={rtt:0,loss:0},this._networkLimits={badNet:{loss:3,rtt:1e3},goodNet:{loss:.5,rtt:600}},this._signaling=n,this._mediaSource=r,this._participantId=e,this._isMaster=t,this._serverSettings=o,this._perfStatReporter=new ln(this,n,!0),this.subscribe(this._signaling,J.NOTIFICATION,this._onSignalingNotification.bind(this)),this.subscribe(this._mediaSource,He.TRACK_REPLACED,this._onReplacedTrack.bind(this)),this.subscribe(this._mediaSource,He.SOURCE_CHANGED,this._applySettings.bind(this)),this._pc=new RTCPeerConnection({iceServers:Nt.iceServers,iceTransportPolicy:Nt.forceRelayPolicy?"relay":"all"},{optional:[{googSuspendBelowMinBitrate:!1}]}),this._pc.onicecandidate=this._handleIceCandidate.bind(this),this._pc.ontrack=this._onAddTrack.bind(this),this._pc.oniceconnectionstatechange=this._onIceConnectionStateChange.bind(this),this._pc.onconnectionstatechange=this._onConnectionStateChange.bind(this),this._pc.onsignalingstatechange=this._onSignalingStateChange.bind(this),this._prevConsumerSettings={},this._isMaster){try{this._mediaSource.addTrackToPeerConnection(this._pc,!1,!0),this._applySettings()}catch(e){return Oe.log(ne.ERROR,"addTrack-direct"),Yt.error("Unable to add media source tracks",e,{participantId:this._participantId}),void(this._failedOnCreate=e)}this._createOffer(!1).catch((e=>{this._state===In.IDLE?this._failedOnCreate=e:this.close(e)}))}this._startSettingsInterval(),this._startStatInterval()}getState(){return this._state}updateStatisticsInterval(){this._stopStatInterval();let e=this.getState();e!==In.IDLE&&e!==In.CLOSED&&e!==In.FAILED&&this._startStatInterval()}open(e=null){return y(this,null,(function*(){if(this._isOpen)return void Yt.warn("DirectTransport: Already opened",{participantId:this._participantId});if(this._failedOnCreate)return void this.close(this._failedOnCreate);if(Yt.debug("DirectTransport: Open transport",{participantId:this._participantId}),this._isOpen=!0,this._remotePeerId=e,!this._isMaster)try{this._mediaSource.addTrackToPeerConnection(this._pc,!1,!0),this._applySettings()}catch(e){return Oe.log(ne.ERROR,"addTrack-direct"),Yt.error("DirectTransport: Unable to add media source tracks",e,{participantId:this._participantId}),void this.close(e)}this._setState(In.OPENED);let t=e;if(!e){let e=Object.keys(this._remoteSDP);t=e[e.length-1]}if(t&&this._remoteSDP[t])try{yield this._setRemoteDescription(t,this._remoteSDP[t])}catch(e){return void this.close()}this._remoteSDP={},this._remoteCandidates={},this._triggerEvent(On.ACTIVE_PARTICIPANTS_NO_SIGNAL)}))}updateSettings(e){tn(e,this._serverSettings)||(this._serverSettings=e,this._applySettings())}preventRestart(){this._reconnectionPrevented=!0}allowRestart(){this._reconnectionPrevented=!1}close(e){this._isOpen=!1,this._stopReconnection(),this._remoteStream&&(this._remoteStream.getTracks().forEach((e=>{e.stop(),this._triggerEvent(On.REMOTE_TRACK_REMOVED,this._remoteStream,e)})),this._remoteStream=null),this._stopStatInterval(),this._stopSettingsInterval(),this._pc&&(this._pc.onicecandidate=null,this._pc.ontrack=null,this._pc.oniceconnectionstatechange=null,this._pc.onconnectionstatechange=null,this._pc.onsignalingstatechange=null,this._pc.close()),this.unsubscribe(),e?(Yt.error("DirectTransport: Closed",e,{participantId:this._participantId}),this._setState(In.FAILED)):(Yt.debug("DirectTransport: Closed",{participantId:this._participantId}),this._setState(In.CLOSED)),this._triggerEvent(On.PEER_CONNECTION_CLOSED)}_setState(e){this._state!==e&&(Yt.debug(`DirectTransport: State changed to ${e}`,{participantId:this._participantId}),this._state=e,this._triggerEvent(On.STATE_CHANGED,e))}_onSignalingNotification(e){var t,n,r,o;switch(e.notification){case ee.TRANSMITTED_DATA:this._handleTransmittedData(e);break;case ee.SETTINGS_UPDATE:Object.assign(this._networkLimits.badNet,(null==(t=e.settings)?void 0:t.badNet)||{}),Object.assign(this._networkLimits.goodNet,(null==(n=e.settings)?void 0:n.goodNet)||{});break;case ee.CUSTOM_DATA:e.data.hasOwnProperty("sdk")&&(this._remoteNetworkStat.rtt=(null==(r=e.data.sdk)?void 0:r.rtt)||0,this._remoteNetworkStat.loss=(null==(o=e.data.sdk)?void 0:o.loss)||0)}}_handleTransmittedData(e){let t=e.data,n=Xe.getPeerIdString(e.peerId);Xe.composeMessageId(e)===this._participantId&&(t.candidate&&t.candidate.candidate?this._addIceCandidate(n,t.candidate).catch(this.close.bind(this)):t.sdp&&this._setRemoteDescription(n,t.sdp).catch(this.close.bind(this)))}_addIceCandidate(e,t){return y(this,null,(function*(){if(this._isOpen&&(!this._remotePeerId||this._remotePeerId===e)&&this._pc&&this._pc.remoteDescription){Yt.debug("Add remote ice candidate",{participantId:this._participantId,candidate:t});try{yield this._pc.addIceCandidate(new RTCIceCandidate(t))}catch(e){throw Oe.log(ne.ERROR,"addIceCandidate-direct"),Yt.error("Unable to add remote ice candidate",e,{participantId:this._participantId,candidate:t}),e}}else Yt.debug("Cache remote ice candidate",{participantId:this._participantId,candidate:t}),this._remoteCandidates[e]=this._remoteCandidates[e]||[],this._remoteCandidates[e].push(t)}))}_setRemoteCandidates(e){return y(this,null,(function*(){if(!this._remoteCandidates[e])return void Yt.log(`No cached candidates found for peer ${e}`);let t=this._remoteCandidates[e];this._remoteCandidates[e]=[];for(let n of t)try{yield this._addIceCandidate(e,n)}catch(e){}}))}_setRemoteDescription(e,t){return y(this,null,(function*(){if(!this._isOpen||this._remotePeerId&&this._remotePeerId!==e||!this._pc)this._remoteSDP[e]=t;else{Yt.debug("Add remote description",{participantId:this._participantId,sdp:t}),this._calcFingerprint(t.sdp);try{yield this._pc.setRemoteDescription(new RTCSessionDescription(t)),yield this._setRemoteCandidates(e)}catch(e){throw Oe.log(ne.ERROR,"setRemoteDescription-direct"),Yt.error("Unable to set remote description",e,{participantId:this._participantId,sdp:t}),e}}}))}_onAddTrack(e){Yt.debug("Added remote track",{participantId:this._participantId,kind:e.track.kind}),this._remoteStream?this._remoteStream.addTrack(e.track):(this._remoteStream=new MediaStream([e.track]),this._remoteStream.onremovetrack=e=>{this._triggerEvent(On.REMOTE_TRACK_REMOVED,this._remoteStream,e.track)}),this._triggerEvent(On.REMOTE_TRACK_ADDED,this._remoteStream,e.track)}_handleIceCandidate(e){return y(this,null,(function*(){e.candidate&&this._signaling.ready&&(Yt.debug("Local ice candidate",{participantId:this._participantId,candidate:e.candidate}),yield this._signaling.sendCandidate(this._participantId,e.candidate))}))}_onSignalingStateChange(){switch(Yt.debug(`DirectTransport: Signaling state changed to ${this._pc.signalingState}`,{participantId:this._participantId}),this._pc.signalingState){case"have-local-offer":let e=this._pc.localDescription;e?this._signaling.sendSdp(this._participantId,e).catch(this.close.bind(this)):this.close(new Error);break;case"have-remote-offer":this._createAnswer().catch(this.close.bind(this)).then((e=>y(this,null,(function*(){return this._signaling.sendSdp(this._participantId,e)})))).catch(this.close.bind(this))}}_onIceConnectionStateChange(){if("checking"===(Yt.debug(`DirectTransport: Ice Connection state changed to ${this._pc.iceConnectionState}`,{participantId:this._participantId}),this._pc.iceConnectionState)){let e=this.getState();e===In.IDLE||e===In.OPENED?this._setState(In.CONNECTING):this._setState(In.RECONNECTING)}}_onConnectionStateChange(){switch(Yt.debug(`DirectTransport: Connection state changed to ${this._pc.connectionState}`,{participantId:this._participantId}),Oe.log(ne.ICE_CONNECTION_STATE,this._pc.connectionState),this._pc.connectionState){case"connected":this._neverConnected=!1,this._setState(In.CONNECTED),this._stopReconnection(),Xe.getPeerConnectionHostInfo(this._pc).then((e=>{e&&Oe.log(ne.ICE_CONNECTION_TYPE,e.type)}));break;case"failed":case"disconnected":this._reconnectionPrevented?this.close(new Error(`Ice connection ${this._pc.connectionState}`)):(this._setState(In.RECONNECTING),this._startReconnection());break;case"closed":this.close(new Error("Ice connection closed"))}}_startReconnection(){this._reconnectionTimeout||this._iceRestartTimeout||(Yt.log("Waiting for reconnection...",{participantId:this._participantId}),this._reconnectionTimeout=window.setTimeout((()=>{this._reconnectionTimeout=null,this._neverConnected?this._requestTopologySwitch():this._startIceRestart()}),Nt.transportConnectionWaitTime))}_requestTopologySwitch(){this._isMaster&&this._signaling.ready&&(Yt.log("Switch topology DIRECT to SERVER",{participantId:this._participantId}),this._signaling.switchTopology(kn.SERVER))}_stopReconnection(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=null),this._iceRestartTimeout&&(clearTimeout(this._iceRestartTimeout),this._iceRestartTimeout=null)}_startIceRestart(){this._isMaster?(Oe.log(ne.ICE_RESTART),Yt.log("Ice restart",{participantId:this._participantId}),this._createOffer(!0).catch(this.close.bind(this))):Yt.debug("Waiting for ice restart...",{participantId:this._participantId}),this._iceRestartTimeout=window.setTimeout((()=>{this._iceRestartTimeout=null,Yt.error("Ice restart failed",{participantId:this._participantId}),Oe.log(ne.ERROR,"iceRestart-direct"),this._requestTopologySwitch()}),Nt.iceRestartWaitTime)}_createOffer(e){return y(this,null,(function*(){let t={iceRestart:e,offerToReceiveAudio:!0,offerToReceiveVideo:!0};return Yt.debug("Create offer",{participantId:this._participantId,options:t}),this._pc.createOffer(t).catch((e=>{throw Yt.error("Unable to create offer",e,{participantId:this._participantId}),Oe.log(ne.ERROR,"createOffer-direct"),e})).then((e=>y(this,null,(function*(){return Yt.debug("Created offer",{participantId:this._participantId,offer:e}),e=Tn._patchDescription(e),Yt.debug("Set local description",{participantId:this._participantId,offer:e}),this._calcFingerprint(e.sdp),this._pc.setLocalDescription(e).then((()=>this._pc.localDescription))})))).catch((e=>{throw Yt.error("Unable to set local description",e,{participantId:this._participantId}),Oe.log(ne.ERROR,"setLocalDescription-direct"),e}))}))}_createAnswer(){return y(this,null,(function*(){return Yt.debug("Create answer",{participantId:this._participantId}),this._pc.createAnswer().catch((e=>{throw Yt.error("Unable to create answer",e,{participantId:this._participantId}),Oe.log(ne.ERROR,"createAnswer-direct"),e})).then((e=>y(this,null,(function*(){return Yt.debug("Created answer",{participantId:this._participantId,answer:e}),e=Tn._patchDescription(e),Yt.debug("Set local description",{participantId:this._participantId,answer:e}),this._calcFingerprint(e.sdp),this._pc.setLocalDescription(e)})))).then((()=>this._pc.localDescription)).catch((e=>{throw Yt.error("Unable to set local description",e,{participantId:this._participantId}),Oe.log(ne.ERROR,"setLocalDescription-direct"),e}))}))}static _patchDescription(e){let t=!!Ct.baseChromeVersion();return e.sdp=Xe.patchSDP(e.sdp,Nt.preferH264&&Ct.canPreferH264(),Ct.isBrokenH264(),Nt.preferVP9,t&&Nt.audioNack),e}_onReplacedTrack(e){this._pc&&(this._pc.getSenders().forEach((t=>{t.track&&t.track.kind===e.kind&&(t.track.enabled=e.enabled,t.replaceTrack(e).catch((e=>{Yt.error("DirectTransport: Unable to replace track",e,{participantId:this._participantId}),Oe.log(ne.ERROR,"replaceTrack-direct")})))})),this._applySettings())}_startStatInterval(){if(this._statInterval)return;let e=()=>{this._pc?wn(this._pc,this._lastStat).then((t=>{this._lastStat=t;let n={inbound:{topology:kn.DIRECT,transport:t.transport,rtps:t.rtps.filter((e=>"inbound-rtp"===e.type&&(e.userId=this._participantId,!0)))},outbound:{topology:kn.DIRECT,transport:t.transport,rtps:t.rtps.filter((e=>"outbound-rtp"===e.type))}};this._checkBadNetwork(n),this._triggerEvent(On.REMOTE_DATA_STATS,n),this._statInterval=window.setTimeout(e,Nt.statisticsInterval)})):this._stopStatInterval()};this._statInterval=window.setTimeout(e,Nt.statisticsInterval)}_stopStatInterval(){this._statInterval&&(window.clearTimeout(this._statInterval),this._statInterval=null)}_checkBadNetwork(e){if(!this._signaling.ready)return;let t=e=>e.rtt<=this._networkLimits.goodNet.rtt&&e.loss<=this._networkLimits.goodNet.loss,n=e=>e.rtt>=this._networkLimits.badNet.rtt||e.loss>=this._networkLimits.badNet.loss,r=Math.round(1e3*e.outbound.transport.currentRoundTripTime)||0,o=e.inbound.rtps.reduce(((e,t)=>Math.max(e,t.packetLoss||0)),0),i={rtt:this._lastNetworkStat.rtt*(1-Sn)+r*Sn,loss:this._lastNetworkStat.loss*(1-Sn)+o*Sn},a=n(i),s=t(i),c=n(this._remoteNetworkStat),l=t(this._remoteNetworkStat),u=n(this._lastNetworkStat),d=t(this._lastNetworkStat),_=a||c?.2:s&&l?1:0,p=Date.now();if((u!==a||d!==s||p-this._lastNetworkStat.date>Nt.networkStatisticsInterval)&&(this._lastNetworkStat.date=Date.now(),this._signaling.customData({sdk:Object.assign({type:"bad-net"},i)},null).catch((e=>{Yt.warn("Unable to send [bad-net]",e)}))),_){let e={};e[this._participantId]=e[""]=_,this._triggerEvent(On.NETWORK_STATUS,e)}this._lastNetworkStat.rtt=i.rtt,this._lastNetworkStat.loss=i.loss}_startSettingsInterval(){if(this._settingsInterval)return;let e=()=>{this._pc?(this._applySettings(),this._settingsInterval=window.setTimeout(e,2e3)):this._stopSettingsInterval()};this._settingsInterval=window.setTimeout(e,2e3)}_stopSettingsInterval(){this._settingsInterval&&(window.clearTimeout(this._settingsInterval),this._settingsInterval=null)}_calcFingerprint(e){let t=Xe.sdpFingerprint(e);null===this._fingerprint?this._fingerprint=t:(Kt.onFingerprintChange(this._fingerprint.xor(t).toString()),this._fingerprint=null)}_applySettings(){var e;let t=this._mediaSource.getMediaSettings().isScreenSharingEnabled?this._serverSettings.screenSharing:this._serverSettings.camera;t&&"connected"===(null==(e=this._pc)?void 0:e.connectionState)&&(this._prevConsumerSettings=Xe.applySettings(this._pc,t,this._prevConsumerSettings))}},An=(e=>(e.producerNotification="producerNotification",e.producerCommand="producerCommand",e.consumerScreenShare="consumerScreenShare",e.producerScreenShare="producerScreenShare",e))(An||{}),Dn=An,Pn=class extends b{constructor(e,t,n){super(),this._pc=null,this._producerNotification=null,this._producerCommand=null,this._producerScreen=null,this._consumerScreen=null,this._isOpen=!1,this._observer=!1,this._reconnectionPrevented=!1,this._state=In.IDLE,this._statInterval=null,this._settingsInterval=null,this._statBytes={},this._ssrcMap={},this._producerOfferIsProcessing=!1,this._producerNextOffer=null,this._prevConsumerSettings={},this._captureSender=null,this._captureReceiver=null,this._participantIdRegistry=null,this._disabledSenders=new Set,this._rtpReceiversByStreamId={},this._producerSessionId="",this._signaling=e,this._mediaSource=t,this.subscribe(this._signaling,J.NOTIFICATION,this._onSignalingNotification.bind(this)),this.subscribe(this._mediaSource,He.TRACK_REPLACED,this._onReplacedTrack.bind(this)),this.subscribe(this._mediaSource,He.SOURCE_CHANGED,this._applyConsumerSettings.bind(this)),this.subscribe(this._mediaSource,He.SCREEN_STATUS,this._onScreenSharingStatus.bind(this)),this._perfStatReporter=new ln(this,e),this._serverSettings=n,Yt.debug("ServerTransport: Created")}getState(){return this._state||In.IDLE}updateStatisticsInterval(){this._stopStatInterval();let e=this.getState();e!==In.IDLE&&e!==In.CLOSED&&e!==In.FAILED&&this._startStatInterval()}open(e=!1){this._isOpen?Yt.log("ServerTransport: Already opened connections"):(this._isOpen=!0,this._observer=e,this._openConnection())}close(e){this._isOpen=!1,this._closeConnection(),this.unsubscribe(),e?(Yt.error("ServerTransport: Closed",e),this._setState(In.FAILED)):(Yt.debug("ServerTransport: Closed"),this._setState(In.CLOSED))}removeParticipant(e){var t;null==(t=this._captureReceiver)||t.close(e)}preventRestart(){this._reconnectionPrevented=!0}allowRestart(){this._reconnectionPrevented=!1}updateSettings(e){tn(e,this._serverSettings)||(this._serverSettings=e,this._applyConsumerSettings())}_closeConnection(){this._stopStatInterval(),this._stopSettingsInterval(),this._removeCaptureSender(),this._removeCaptureReceiver(),this._pc&&(this._rtpReceiversByStreamId={},this._disabledSenders.forEach((e=>{var t;return null==(t=e.track)?void 0:t.stop()})),this._disabledSenders.clear(),this._pc.ontrack=null,this._pc.onconnectionstatechange=null,this._pc.onsignalingstatechange=null,this._participantIdRegistry=null,Pn._closeDataChannel(this._producerNotification),Pn._closeDataChannel(this._producerCommand),Pn._closeDataChannel(this._producerScreen),Pn._closeDataChannel(this._consumerScreen),this._pc.close(),this._pc=null,this._producerOfferIsProcessing=!1,this._producerNextOffer=null),this._triggerEvent(On.PEER_CONNECTION_CLOSED)}static _closeDataChannel(e){e&&(e.onopen=null,e.onmessage=null,e.onerror=null,e.close())}_createDataChannel(e,t,n){Yt.debug(`[${t}] data channel opening`);let r=e.createDataChannel(t,{ordered:!0});r.onopen=()=>{let e=r.readyState;"open"===e?(Yt.debug(`[${t}] data channel opened`),r.onerror=e=>{Yt.error(`[${t}] data channel error`,e)},n(r)):Yt.error(`[${t}] data channel open failed, state [${e}]`)}}_openConnection(e=!1){Yt.debug("ServerTransport: Open single connection");let t={};Ct.baseChromeVersion()&&(t.sdpSemantics=Pn._isUnifiedPlanSupported()?"unified-plan":"plan-b"),this._pc=new RTCPeerConnection(t,{optional:[{googSuspendBelowMinBitrate:!1}]}),this._pc.ontrack=this._onAddTrack.bind(this,this._pc),this._pc.onconnectionstatechange=Xe.throttle((e=>{this._pc&&this._onConnectionStateChange(this._pc,e)}),500),this._pc.onsignalingstatechange=Pn._onSignalingStateChange.bind(this,this._pc),Nt.producerNotificationDataChannel&&this._createDataChannel(this._pc,Dn.producerNotification,(e=>{this._producerNotification=e,this._producerNotification.binaryType="arraybuffer",this._participantIdRegistry=new class{constructor(){this.streamDescriptionByCompactId=new Map}getStreamDescription(e){return this.streamDescriptionByCompactId.get(e)}handleMessage(e){var t,n;let r=new Uint8Array(e),o=r[0],i=r.subarray(1);switch(o){case 1:let e=(0,_.decode)(i);return Object.entries(e).forEach((([e,t])=>{let n=Jt(e);this.streamDescriptionByCompactId.set(t,n)})),null;case 2:case 4:let r=(0,_.decode)(i),a=[];for(let e of r){let t=this.getStreamDescription(e);t&&a.push(t.participantId)}return 2===o?{type:"notification",notification:ee.AUDIO_ACTIVITY,activeParticipants:a}:{type:"notification",notification:ee.STALLED_ACTIVITY,stalledParticipants:a};case 3:let s=(0,_.decode)(i);return{type:"notification",notification:ee.SPEAKER_CHANGED,speaker:null==(t=this.getStreamDescription(s))?void 0:t.participantId};case 5:let c=(0,_.decode)(i);return{type:"notification",notification:ee.VIDEO_QUALITY_UPDATE,quality:{maxBitrate:c[0],maxDimension:c[1]}};case 6:let l=(0,_.decode)(i),u={};for(let[e,t]of Object.entries(l)){let r=null==(n=this.getStreamDescription(Number(e)))?void 0:n.participantId;r&&(u[r]=t/100)}return{type:"notification",notification:ee.NETWORK_STATUS,statuses:u};case 7:return this._createParticipantSourcesUpdateNotification(i);default:return Yt.debug("unsupported message type: "+o),null}}_createParticipantSourcesUpdateNotification(e){let t=(0,_.decode)(e),n=[];for(let[e,r]of Object.entries(t)){let t,o=r[0],i=r[1],a=r[2];if(null!==o){if(t=this.getStreamDescription(o),!t){Yt.error(`could not uncompress participant ID ${o}`);continue}}else t=null;if(null===a){Yt.error("unexpected null sequenceNumber",e,r);continue}let s=oe.PARTICIPANT_AGNOSTIC_TRACK_PREFIX+"-"+e,c=i?i>>>0:null;n.push({participantStreamDescription:t,streamId:s,rtpTimestamp:c,sequenceNumber:a})}return{type:"notification",notification:ee.PARTICIPANT_SOURCES_UPDATE,participantUpdateInfos:n}}},this._signaling.setParticipantIdRegistry(this._participantIdRegistry),this._signaling.setProducerNotificationDataChannel(e)})),Nt.producerCommandDataChannel&&this._createDataChannel(this._pc,Dn.producerCommand,(e=>{this._producerCommand=e,this._signaling.setProducerCommandDataChannel(e)})),Nt.producerScreenDataChannel&&this._createDataChannel(this._pc,Dn.producerScreenShare,(e=>{this._producerScreen=e,this._producerScreen.binaryType="arraybuffer",this._createCaptureReceiver()}));try{this._mediaSource.addTrackToPeerConnection(this._pc,this._observer),this._prevConsumerSettings={},this._applyConsumerSettings()}catch(e){return Yt.error("ServerTransport: Unable to add media source tracks",e),Oe.log(ne.ERROR,"addTrack-single"),void this.close(e)}Nt.consumerScreenDataChannel&&this._createDataChannel(this._pc,Dn.consumerScreenShare,(e=>{this._consumerScreen=e,this._consumerScreen.binaryType="arraybuffer";let t=this._mediaSource.getScreenTrack();t&&this._createCaptureSender(t)})),e||this._allocateConsumer(),this._setState(In.OPENED),this._startStatInterval(),this._startSettingsInterval()}_reconnect(){this.getState()!==In.OPENED&&(this._setState(In.RECONNECTING),this._closeConnection(),this._openConnection(!0))}_signalActiveParticipants(e){this._triggerEvent(On.SIGNALLED_ACTIVE_PARTICIPANTS,e)}_signalStalledParticipants(e){this._triggerEvent(On.SIGNALLED_STALLED_PARTICIPANTS,e)}_signalSpeakerChanged(e){this._triggerEvent(On.SIGNALLED_SPEAKER_CHANGED,e)}_signalNetworkStatus(e){this._triggerEvent(On.NETWORK_STATUS,e)}_updateSSRCMap(e){e&&e.sdp.split("\n").forEach((e=>{let t=`a=ssrc:([0-9]+) label:(audio|video)-((?:[ug]?[\\d]+)|(?:mix)|(?:${oe.PARTICIPANT_AGNOSTIC_TRACK_PREFIX}-[0-9]+))`,n=new RegExp(t).exec(e);n&&(this._ssrcMap[n[1]]=n[3])}))}_createCaptureSender(e){!e||!Nt.consumerScreenDataChannel||!this._consumerScreen||!this._mediaSource.getMediaSettings().isScreenSharingEnabled||(this._captureSender&&this._removeCaptureSender(),this._captureSender=new Mt(e,this._consumerScreen))}_removeCaptureSender(){var e;null==(e=this._captureSender)||e.destroy(),this._captureSender=null}_createCaptureReceiver(){!Nt.producerScreenDataChannel||!this._producerScreen||!this._participantIdRegistry||(this._captureReceiver&&this._removeCaptureReceiver(),this._captureReceiver=new Ot(this._producerScreen,this._participantIdRegistry,((e,t)=>{this._triggerEvent(On.REMOTE_STREAM_SECOND,e,t)}),(e=>{this._triggerEvent(On.REMOTE_STREAM_SECOND,e,null)})))}_removeCaptureReceiver(){var e;null==(e=this._captureReceiver)||e.destroy(),this._captureReceiver=null}_applyConsumerSettings(){let e=this._mediaSource.getMediaSettings().isScreenSharingEnabled&&!Nt.consumerScreenDataChannel?this._serverSettings.screenSharing:this._serverSettings.camera;if(e&&this._pc){let t=[];this._pc.getSenders().forEach((n=>{if(!n.track||n.track.kind!==je.video)return;let r=!this._disabledSenders.has(n),o=0!==e.maxDimension;if(r&&!o)return Yt.log("Disabling video upload"),this._disabledSenders.add(n),void n.replaceTrack(Ct.getBlackMediaTrack()).catch((e=>{Yt.error("Could not disable video upload",e)}));let i=this._mediaSource.getSendVideoTrack();if(!r&&o&&i){Yt.log("Enabling video upload"),this._disabledSenders.delete(n);let e=n.track;e.enabled=i.enabled,n.replaceTrack(i).then((()=>e.stop())).catch((e=>{Yt.error("Could not enable video upload",e)}))}Xe.applyVideoTrackSettings(e,n,null!=i?i:n.track,this._prevConsumerSettings,t)})),this._prevConsumerSettings=t}}_onScreenSharingStatus(e){e.track?this._createCaptureSender(e.track):this._removeCaptureSender()}_setState(e){this._state!==e&&(this._state=e,this._triggerEvent(On.STATE_CHANGED,e))}_startStatInterval(){if(this._statInterval)return;let e=()=>{this._pc?(this._collectStat().then((e=>{this._reportStats(e),this._detectStaleTracks(e)})).catch((()=>{})),this._statInterval=window.setTimeout(e,Nt.statisticsInterval)):this._stopStatInterval()};this._statInterval=window.setTimeout(e,Nt.statisticsInterval)}_stopStatInterval(){this._statInterval&&(window.clearTimeout(this._statInterval),this._statInterval=null),this._statBytes={}}_startSettingsInterval(){if(this._settingsInterval)return;let e=()=>{this._pc?(this._applyConsumerSettings(),this._settingsInterval=window.setTimeout(e,2e3)):this._stopSettingsInterval()};this._settingsInterval=window.setTimeout(e,2e3)}_stopSettingsInterval(){this._settingsInterval&&(window.clearTimeout(this._settingsInterval),this._settingsInterval=null)}_collectStat(){return y(this,null,(function*(){if(!this._pc)return Promise.reject();let e=yield wn(this._pc,this._lastStat,this._ssrcMap);return this._lastStat=e,e}))}_reportStats(e){this._triggerEvent(On.REMOTE_DATA_STATS,{inbound:{topology:kn.SERVER,transport:e.transport,rtps:e.rtps.filter((e=>"inbound-rtp"===e.type))},outbound:{topology:kn.SERVER,transport:e.transport,rtps:e.rtps.filter((e=>"outbound-rtp"===e.type))}})}_detectStaleTracks(e){let t=e.rtps.find((e=>"inbound-rtp"===e.type&&"audio"===e.kind&&"mix"===this._ssrcMap[e.ssrc]));if(!t)return;let n=oe.AUDIO_MIX,r=this._statBytes[n],o=!1;if(r){let e=t.bytesReceived-r.bytesReceived;e>=0&&e<=5&&(o=!0),r.stalled!==o&&this._triggerEvent(On.REMOTE_ALL_STALL,o)}this._statBytes[n]={bytesReceived:t.bytesReceived,stalled:o}}_allocateConsumer(){if(!this._signaling.ready)return;let e={estimatedPerformanceIndex:ln.getEstimatedPerformanceIndex(),audioMix:!0,consumerUpdate:!0,producerNotificationDataChannelVersion:Nt.producerNotificationDataChannel?6:0,producerCommandDataChannelVersion:Nt.producerCommandDataChannel?2:0,consumerScreenDataChannelVersion:Nt.consumerScreenDataChannel?1:0,producerScreenDataChannelVersion:Nt.producerScreenDataChannel?1:0,onDemandTracks:!0,unifiedPlan:Pn._isUnifiedPlanSupported(),singleSession:!0,videoTracksCount:Nt.videoTracksCount};this._signaling.allocateConsumer(null,e)}_acceptProducer(e){return y(this,null,(function*(){if(this._producerOfferIsProcessing)return this._producerNextOffer=e,void Yt.debug("[single] wait until other remote offer is processed");this._producerOfferIsProcessing=!0;let t=new RTCSessionDescription({type:"offer",sdp:e});if(Yt.debug("[single] set remote offer",{offer:t}),!this._pc)throw new Error("Interrupt allocation");this._pc.setRemoteDescription(t).catch((e=>{throw Yt.error("[single] unable to set remote offer",e),Oe.log(ne.ERROR,"setRemoteDescription-single"),e})).then((()=>y(this,null,(function*(){if(Yt.debug("[single] create local answer"),!this._pc)throw new Error("Interrupt allocation");return this._pc.createAnswer()})))).catch((e=>{throw Yt.error("[single] unable to create answer",e),Oe.log(ne.ERROR,"createAnswer-single"),e})).then((e=>(e.sdp=Xe.patchSDP(e.sdp,!1,Ct.isBrokenH264(),!1),e))).then((e=>y(this,null,(function*(){if(Yt.debug("[single] set local answer",{answer:e}),!this._pc)throw new Error("Interrupt allocation");return yield this._pc.setLocalDescription(e),e})))).catch((e=>{throw Yt.error("[single] unable to set local answer",e),Oe.log(ne.ERROR,"setLocalDescription-single"),e})).then((e=>y(this,null,(function*(){Yt.debug("[single] transmit local answer",{answer:e}),this._updateSSRCMap(t),yield this._signaling.acceptProducer(e,Object.keys(this._ssrcMap)),Yt.debug("[single] remote offer has been processed")})))).catch((e=>{Yt.warn("[single] unable to send local answer",e),Oe.log(ne.ERROR,"acceptProducer")})).then((()=>y(this,null,(function*(){if(this._producerOfferIsProcessing=!1,this._producerNextOffer){Yt.debug("[single] there is other unprocessed remote offer, process it");let e=this._producerNextOffer;return this._producerNextOffer=null,this._acceptProducer(e)}})))).catch((e=>this.close(e)))}))}_onSignalingNotification(e){return y(this,null,(function*(){if(this._isOpen)switch(e.notification){case ee.PRODUCER_UPDATED:yield this._onProducerUpdated(e);break;case ee.REALLOC_CON:this._reconnect();break;case ee.AUDIO_ACTIVITY:this._signalActiveParticipants(e.activeParticipants);break;case ee.SPEAKER_CHANGED:this._signalSpeakerChanged(e.speaker);break;case ee.STALLED_ACTIVITY:this._signalStalledParticipants(e.stalledParticipants);break;case ee.NETWORK_STATUS:this._signalNetworkStatus(e.statuses)}}))}_onProducerUpdated(e){return y(this,null,(function*(){this._producerSessionId&&this._producerSessionId!==e.sessionId&&this._reconnect(),Nt.breakVideoPayloadTypes&&(Yt.log("test mode enabled, video switched off"),this._signaling.requestTestMode("breakVideoPayloadTypes")),this._producerSessionId=e.sessionId,yield this._acceptProducer(e.description)}))}_onAddTrack(e,t){Yt.debug("[single] remote track (added)",{track:t.track});let n=t.streams[0];n?(n.onremovetrack||(n.onremovetrack=e=>{this._triggerEvent(On.REMOTE_TRACK_REMOVED,n.id,n,e.track)}),n.getTracks().find((e=>e.id===t.track.id))||n.addTrack(t.track),this._rtpReceiversByStreamId[n.id]=t.receiver,this._triggerEvent(On.REMOTE_TRACK_ADDED,n.id,n,t.track)):Yt.error("[single] unable to get media stream from track event")}static _onSignalingStateChange(e,t){Yt.debug("[single] signaling state changed",{state:e.signalingState},t)}_onConnectionStateChange(e,t){switch(Yt.debug("[single] connection state changed",{state:e.connectionState},t),Oe.log(ne.ICE_CONNECTION_STATE,e.connectionState),e.connectionState){case"failed":this._reconnectionPrevented?this.close(new Error("Ice connection failed")):this._reconnect();break;case"connecting":let t=this.getState();t===In.IDLE||t===In.OPENED?this._setState(In.CONNECTING):"checking"===e.iceConnectionState&&this._setState(In.RECONNECTING);break;case"disconnected":this._reconnectionPrevented?this.close(new Error("Ice connection disconnected")):this._setState(In.RECONNECTING);break;case"connected":this._setState(In.CONNECTED),Xe.getPeerConnectionHostInfo(e).then((e=>{e&&Oe.log(ne.ICE_CONNECTION_TYPE,e.type)}))}}_onReplacedTrack(e,t){this._pc&&(Nt.consumerScreenDataChannel&&t&&(e=t),this._pc.getSenders().forEach((t=>{t.track&&t.track.kind===e.kind&&!this._disabledSenders.has(t)&&(t.track.enabled=e.enabled,t.replaceTrack(e).catch((e=>{Yt.error("ServerTransport: Unable to replace track",e),Oe.log(ne.ERROR,"replaceTrack-single")})))}))),this._applyConsumerSettings()}static _isUnifiedPlanSupported(){let e=Ct.baseChromeVersion();return e?Nt.isUnifiedPlanSupported("Chrome",e):Nt.isUnifiedPlanSupported(Ct.browserName(),Number(Ct.browserVersion()))}getStreamWaitingTimeMs(e,t){if(!this._pc)return Oe.log(ne.PAT_WAITING_TIME_ERROR,"noConnection"),Yt.error("Cannot get stream waiting time, peer connection is not initialized"),0;let n=this._rtpReceiversByStreamId[e];if(!n)return Oe.log(ne.PAT_WAITING_TIME_ERROR,"noReceiver"),Yt.error(`Cannot get stream waiting time, cannot find RTP receiver by stream ID: ${e}`),0;let r=n.getSynchronizationSources();if(!r||!r.length)return Yt.log(`Cannot get stream waiting time, ${e} receiver has no synchronization sources`),0;let o=r[0].rtpTimestamp;if(!Number.isInteger(o))return Oe.log(ne.PAT_WAITING_TIME_ERROR,"timestampNotInteger"),Yt.error(`Cannot get stream waiting time, ${e} receiver's RTP timestamp is not an integer: ${o}`),0;let i=t-o&4294967295,a=Math.ceil(i/90);return Math.min(100,Math.max(0,a))}},On=(e=>(e.REMOTE_TRACK_ADDED="REMOTE_TRACK_ADDED",e.REMOTE_TRACK_REMOVED="REMOTE_TRACK_REMOVED",e.REMOTE_STREAM_SECOND="REMOTE_STREAM_SECOND",e.REMOTE_ALL_STALL="REMOTE_ALL_STALL",e.REMOTE_DATA_STATS="REMOTE_DATA_STATS",e.STATE_CHANGED="STATE_CHANGED",e.LOCAL_STATE_CHANGED="LOCAL_STATE_CHANGED",e.SIGNALLED_ACTIVE_PARTICIPANTS="SIGNALLED_ACTIVE_PARTICIPANTS",e.ACTIVE_PARTICIPANTS_NO_SIGNAL="ACTIVE_PARTICIPANTS_NO_SIGNAL",e.SIGNALLED_SPEAKER_CHANGED="SIGNALLED_SPEAKER_CHANGED",e.SIGNALLED_STALLED_PARTICIPANTS="SIGNALLED_STALLED_PARTICIPANTS",e.TOPOLOGY_CHANGED="TOPOLOGY_CHANGED",e.NETWORK_STATUS="NETWORK_STATUS",e.PEER_CONNECTION_CLOSED="PEER_CONNECTION_CLOSED",e))(On||{}),In=((bn=In||{}).IDLE="IDLE",bn.OPENED="OPENED",bn.CONNECTING="CONNECTING",bn.RECONNECTING="RECONNECTING",bn.CONNECTED="CONNECTED",bn.CLOSED="CLOSED",bn.FAILED="FAILED",bn),kn=(e=>(e.DIRECT="DIRECT",e.SERVER="SERVER",e))(kn||{}),Rn=class extends b{constructor(e,t,n,r){super(),this._allocated=[],this._opened=[],this._directTransport=null,this._serverTransport=null,this._dtListeners=[],this._stListeners=[],this._states={},this._localState="IDLE",this._signaling=t,this._mediaSource=n,this._topology=e,this._serverSettings=r,this.subscribe(this._signaling,J.NOTIFICATION,this._onSignalingNotification.bind(this)),"SERVER"===e&&(this._serverTransport=this._createServerTransport())}updateSettings(e){this._serverSettings=e,this._directTransport&&this._directTransport.updateSettings(e),this._serverTransport&&this._serverTransport.updateSettings(e)}updateStatisticsInterval(){this._directTransport&&this._directTransport.updateStatisticsInterval(),this._serverTransport&&this._serverTransport.updateStatisticsInterval()}allocate(e,t=!1){-1===this._allocated.indexOf(e)?(this._allocated.push(e),"DIRECT"===this._topology&&!this._directTransport&&(this._directTransport=this._createDirectTransport(e,t)),"SERVER"===this._topology&&!this._serverTransport&&(this._serverTransport=this._createServerTransport())):Yt.warn(`The participant [${e}] has already had allocated transport`)}open(e,t=null,n=!1){let r=!1;for(let t of e)-1===this._opened.indexOf(t)?-1!==this._allocated.indexOf(t)?(this._opened.push(t),r=!0):Yt.warn(`The participant [${t}] has no allocated transport`):Yt.warn(`The participant [${t}] has already had opened transport`);!r||("DIRECT"===this._topology&&this._directTransport&&this._directTransport.open(t),"SERVER"===this._topology&&this._serverTransport&&(this._serverTransport.open(n),this._setStates(e,this._serverTransport.getState()),this._setLocalState(this._serverTransport.getState())),Yt.debug("The transport has been opened",e))}close(e){var t;let n=this._allocated.indexOf(e),r=this._opened.indexOf(e);n<0&&Yt.warn(`The participant [${e}] transport has already deallocated`),"DIRECT"===this._topology&&this._directTransport&&(this._directTransport.close(),this._directTransport=null),"SERVER"===this._topology&&(null==(t=this._serverTransport)||t.removeParticipant(e),this._setState(e,"CLOSED")),r>=0&&this._opened.splice(r,1),n>=0&&this._allocated.splice(n,1)}destroy(){this.unsubscribe(),this._dtListeners&&this._dtListeners.forEach((e=>{e.dispose()})),this._stListeners&&this._stListeners.forEach((e=>{e.dispose()})),this._directTransport&&(this._directTransport.close(),this._directTransport=null),this._serverTransport&&(this._serverTransport.close(),this._serverTransport=null),this._allocated=[],this._opened=[]}getTopology(){return this._topology}isAllocated(e){return this._allocated.indexOf(e)>=0}allocated(){return this._allocated.slice()}opened(){return this._opened.slice()}_setStates(e,t){let n=e.filter((e=>this._states[e]!==t&&(this._states[e]=t,!0)));n.length&&this._triggerEvent("STATE_CHANGED",n,t)}_setState(e,t){this._states[e]!==t&&(this._states[e]=t,this._triggerEvent("STATE_CHANGED",[e],t))}_setLocalState(e){this._localState!==e&&(this._localState=e,this._triggerEvent("LOCAL_STATE_CHANGED",e))}_onSignalingNotification(e){return e.notification===ee.TOPOLOGY_CHANGED?this._onTopologyChanged(e):e.notification===ee.RECORD_STARTED?this._onRecordStarted(e):void 0}_onTopologyChanged(e){var t;if(e.topology!==this._topology){if(Yt.log(`Topology changed ${this._topology} -> ${e.topology}`),Oe.log(ne.TOPOLOGY_CHANGE_REQUESTED,e.topology),this._topology=e.topology,"SERVER"===this._topology&&(this._serverTransport?this._serverTransport.allowRestart():(this._serverTransport=this._createServerTransport(),this._opened.length>0&&(null==(t=this._directTransport)||t.preventRestart(),this._serverTransport.open()))),"DIRECT"===this._topology){let t=e.offerTo||[],n=e.offerToTypes||[],r=e.offerToDeviceIdxs||[],o=t.length&&n.length?Xe.composeParticipantId(t[0],n[0],r[0]):null;if(this._serverTransport&&this._serverTransport.preventRestart(),!this._allocated||0===this._allocated.length)return void Yt.error("Topology changed to DIRECT, but the list of allocated participants is empty");this._allocated.length>1&&Yt.warn("Topology changed to DIRECT, but the allocated participants count more then one");let i=this._allocated[0];if(this._directTransport)this._directTransport.allowRestart();else{let e=o===i;this._directTransport=this._createDirectTransport(i,e)}this._opened.indexOf(i)>=0&&this._directTransport.open()}this._triggerEvent("TOPOLOGY_CHANGED",this._topology)}}_onRecordStarted(e){this._serverTransport&&this._serverTransport.open()}_createDirectTransport(e,t=!1){let n=new Tn(e,t,this._signaling,this._mediaSource,this._serverSettings);return this._setLocalNoiseSuppression(!0),this._dtListeners&&this._dtListeners.length>0&&Yt.warn(`The list of direct listeners for the participant [${e}] is not empty`),this._dtListeners=[],this._dtListeners.push(n.addEventListener("REMOTE_TRACK_ADDED",this._onDirectRemoteTrackAdded.bind(this,e)),n.addEventListener("REMOTE_TRACK_REMOVED",this._onDirectRemoteTrackRemoved.bind(this,e)),n.addEventListener("REMOTE_DATA_STATS",this._onDirectRemoteDataStats.bind(this)),n.addEventListener("STATE_CHANGED",this._onDirectTransportChanged.bind(this,e)),n.addEventListener("NETWORK_STATUS",this._onTransportNetworkStatus.bind(this)),n.addEventListener("PEER_CONNECTION_CLOSED",this._onPeerConnectionClosed.bind(this,"DIRECT"))),n}_createServerTransport(){let e=new Pn(this._signaling,this._mediaSource,this._serverSettings);return this._setLocalNoiseSuppression(!1),this._stListeners&&this._stListeners.length>0&&Yt.warn("The list of server transport listeners is not empty"),this._stListeners=[],this._stListeners.push(e.addEventListener("REMOTE_TRACK_ADDED",this._onServerRemoteTrackAdded.bind(this)),e.addEventListener("REMOTE_TRACK_REMOVED",this._onServerRemoteTrackRemoved.bind(this)),e.addEventListener("REMOTE_ALL_STALL",this._onServerRemoteAllStall.bind(this)),e.addEventListener("REMOTE_DATA_STATS",this._onServerRemoteDataStats.bind(this)),e.addEventListener("STATE_CHANGED",this._onServerTransportChanged.bind(this)),e.addEventListener("ACTIVE_PARTICIPANTS_NO_SIGNAL",this._onTransportActiveParticipantsNoSignal.bind(this)),e.addEventListener("SIGNALLED_ACTIVE_PARTICIPANTS",this._onTransportActiveParticipants.bind(this)),e.addEventListener("SIGNALLED_SPEAKER_CHANGED",this._onTransportSpeakerChanged.bind(this)),e.addEventListener("SIGNALLED_STALLED_PARTICIPANTS",this._onTransportStalledParticipants.bind(this)),e.addEventListener("NETWORK_STATUS",this._onTransportNetworkStatus.bind(this)),e.addEventListener("REMOTE_STREAM_SECOND",this._onRemoteStreamSecond.bind(this)),e.addEventListener("PEER_CONNECTION_CLOSED",this._onPeerConnectionClosed.bind(this,"SERVER"))),e}_releaseDirectTransport(e){this._directTransport&&(e&&this._directTransport.close(),this._directTransport=null),this._dtListeners&&(this._dtListeners.forEach((e=>{e.dispose()})),this._dtListeners=[])}_releaseServerTransport(e){this._serverTransport&&(e&&this._serverTransport.close(),this._serverTransport=null),this._stListeners&&(this._stListeners.forEach((e=>{e.dispose()})),this._stListeners=[])}_setLocalNoiseSuppression(e){var t;Nt.noiseSuppression!==e&&(Nt.noiseSuppression=e,null==(t=this._mediaSource)||t.updateNoiseSuppression())}_onDirectTransportChanged(e,t){if("CONNECTED"===t&&"DIRECT"===this._topology&&this._releaseServerTransport(!0),("CLOSED"===t||"FAILED"===t)&&(this._releaseDirectTransport(!1),"DIRECT"===this._topology)){let t=this._opened.indexOf(e);t>=0&&this._opened.splice(t,1);let n=this._allocated.indexOf(e);n>=0&&this._allocated.splice(n,1)}"DIRECT"===this._topology&&(this._setState(e,t),this._setLocalState(t))}_onServerTransportChanged(e){let t=this._opened.slice();"CONNECTED"===e&&"SERVER"===this._topology&&this._releaseDirectTransport(!0),("CLOSED"===e||"FAILED"===e)&&(this._releaseServerTransport(!1),"SERVER"===this._topology&&(this._allocated=[],this._opened=[])),"SERVER"===this._topology&&(this._setStates(t,e),this._setLocalState(e))}_onTransportActiveParticipantsNoSignal(){this._triggerEvent("ACTIVE_PARTICIPANTS_NO_SIGNAL")}_onTransportActiveParticipants(e){"SERVER"===this._topology&&this._triggerEvent("SIGNALLED_ACTIVE_PARTICIPANTS",e)}_onTransportStalledParticipants(e){"SERVER"===this._topology&&this._triggerEvent("SIGNALLED_STALLED_PARTICIPANTS",e)}_onTransportSpeakerChanged(e){"SERVER"===this._topology&&this._triggerEvent("SIGNALLED_SPEAKER_CHANGED",e)}_onTransportNetworkStatus(e){this._triggerEvent("NETWORK_STATUS",e)}_onRemoteStreamSecond(e,t){this._triggerEvent("REMOTE_STREAM_SECOND",e,t)}_onPeerConnectionClosed(e){this._triggerEvent("PEER_CONNECTION_CLOSED",e)}_onServerRemoteAllStall(e){"SERVER"===this._topology&&this._triggerEvent("REMOTE_ALL_STALL",e)}_onServerRemoteDataStats(e){this._triggerEvent("REMOTE_DATA_STATS",e)}_onDirectRemoteTrackAdded(e,t,n){this._triggerEvent("REMOTE_TRACK_ADDED",e,t,n)}_onDirectRemoteTrackRemoved(e,t,n){this._triggerEvent("REMOTE_TRACK_REMOVED",e,t,n)}_onDirectRemoteDataStats(e){this._triggerEvent("REMOTE_DATA_STATS",e)}_onServerRemoteTrackAdded(e,t,n){this._triggerEvent("REMOTE_TRACK_ADDED",e,t,n)}_onServerRemoteTrackRemoved(e,t,n){this._triggerEvent("REMOTE_TRACK_REMOVED",e,t,n)}getStreamWaitingTimeMs(e,t){return"SERVER"!==this._topology?(Oe.log(ne.PAT_WAITING_TIME_ERROR,"wrongTopology"),Yt.error(`Cannot get stream waiting time, incorrect topology: ${this._topology}`),0):this._serverTransport?this._serverTransport.getStreamWaitingTimeMs(e,t):(Oe.log(ne.PAT_WAITING_TIME_ERROR,"noTransport"),Yt.error("Cannot get stream waiting time, server transport is not initialized"),0)}},Mn=((Cn=Mn||{}).VOLUMES_DETECTED="VOLUMES_DETECTED",Cn),Ln=class extends b{constructor(e){super(),this._detector=null,this._interval=null,this.subscribe(e,On.REMOTE_TRACK_ADDED,this._onRemoteTrackAdded.bind(this)),this.subscribe(e,On.REMOTE_TRACK_REMOVED,this._onRemoteTrackRemoved.bind(this)),this.subscribe(e,On.SIGNALLED_ACTIVE_PARTICIPANTS,this._onSignalledActiveParticipants.bind(this)),this.subscribe(e,On.ACTIVE_PARTICIPANTS_NO_SIGNAL,this._onActiveParticipantsNoSignal.bind(this))}destroy(){var e;this._interval&&(window.clearTimeout(this._interval),this._interval=null),this.unsubscribe(),null==(e=this._detector)||e.destroy(),this._detector=null}_onRemoteTrackAdded(e,t,n){var r;if(n.kind===je.audio&&(null==(r=this._detector)||r.destroy(),this._detector=new an(e,t),!this._interval)){let e=()=>{this._collectVolumes(),this._interval=window.setTimeout(e,Nt.voiceParams.interval)};this._interval=window.setTimeout(e,Nt.voiceParams.interval)}}_onRemoteTrackRemoved(e,t,n){n.kind===je.audio&&(!this._detector||this._detector.stream!==t||(this._detector.destroy(),this._detector=null))}_collectVolumes(){if(!this._detector)return;let e={},t=this._detector.trackId,n=this._detector.getLevel();if(t===oe.AUDIO_MIX){if(this._activeParticipants)for(let t of this._activeParticipants)e[t]=n}else e[t]=n;this._triggerEvent("VOLUMES_DETECTED",e)}_onSignalledActiveParticipants(e){this._activeParticipants=e}_onActiveParticipantsNoSignal(){this._activeParticipants=null}},xn=(e=>(e.SPEAKER_CHANGED="SPEAKER_CHANGED",e))(xn||{}),Nn=class extends b{constructor(e,t){super(),this._speakerId=null,this._serverAudioActivityAvailable=!1,this.subscribe(e,Mn.VOLUMES_DETECTED,this._onVolumesDetected.bind(this)),this.subscribe(t,On.SIGNALLED_SPEAKER_CHANGED,this._onServerSpeakerChanged.bind(this)),this.subscribe(t,On.SIGNALLED_ACTIVE_PARTICIPANTS,this._onReceivedServerAudioActivity.bind(this)),this.subscribe(t,On.ACTIVE_PARTICIPANTS_NO_SIGNAL,this._onStoppedReceivingServerAudioActivity.bind(this))}destroy(){this.unsubscribe()}_onVolumesDetected(e){if(this._serverAudioActivityAvailable)return;let t=0,n=null;if(Object.keys(e).forEach((r=>{let o=e[r].smoothed;o>t&&o>Nt.voiceParams.threshold&&(t=o,n=r)})),n&&n!==this._speakerId){let r=this._speakerId&&e.hasOwnProperty(this._speakerId)?e[this._speakerId].smoothed:0;t>r*Nt.voiceParams.speakerLevelMultiplier&&(this._speakerId=n,this._triggerEvent("SPEAKER_CHANGED",n))}}_onServerSpeakerChanged(e){this._serverAudioActivityAvailable&&this._triggerEvent("SPEAKER_CHANGED",e)}_onReceivedServerAudioActivity(){this._serverAudioActivityAvailable=!0}_onStoppedReceivingServerAudioActivity(){this._serverAudioActivityAvailable=!1}},Bn=class extends b{constructor(e,t,n){super(),this._states={},this._volumes={},this._participants={},this._connectionTimeout=0,this._volumeTimeout=0,this._transport=e,this._participants=n,this.subscribe(e,On.STATE_CHANGED,this._onTransportStateChanged.bind(this)),this.subscribe(t,Mn.VOLUMES_DETECTED,this._onVolumesDetected.bind(this))}destroy(){this.unsubscribe(),this._connectionTimeout&&window.clearTimeout(this._connectionTimeout),this._volumeTimeout&&window.clearTimeout(this._volumeTimeout)}onChangeRemoteMediaSettings(e,t){t.isAudioEnabled||(this._volumes[e]=1),t.isAudioEnabled&&(this._volumes[e]=0)}_onTransportStateChanged(e,t){e.forEach((e=>this._states[e]=t)),t===In.OPENED&&(this._connectionTimeout||(this._connectionTimeout=window.setTimeout(this._onConnectionTimeout.bind(this),Nt.specListenerParams.connectionTimeout)),this._volumeTimeout||(this._volumeTimeout=window.setTimeout(this._onVolumeTimeout.bind(this),Nt.specListenerParams.volumeTimeout))),t===In.FAILED&&this._connectionTimeout&&(Yt.warn("Transport failed, send callSpecError"),Oe.log(ne.CALL_SPEC_ERROR,`${this._transport.getTopology()}_CONNECTION_TIMEOUT`))}_onVolumesDetected(e){Object.keys(e).forEach((t=>{this._volumes[t]=Math.max(e[t].real,this._volumes[t]||0)}))}_onConnectionTimeout(){let e=e=>e!==In.CONNECTED;(()=>Object.values(this._states).filter(e).length>0)()&&(Yt.warn("There is not connected transport, send callSpecError"),Oe.log(ne.CALL_SPEC_ERROR,`${this._transport.getTopology()}_CONNECTION_TIMEOUT`)),this._connectionTimeout=0}_onVolumeTimeout(){let e=[];Object.keys(this._volumes).forEach((t=>{if(this._volumes[t]>0)return;let n="UNKNOWN",r=this._participants[t];r&&r.platform&&(n=r.platform),e.indexOf(n)<0&&(e.push(n),Oe.log(ne.CALL_SPEC_ERROR,`${this._transport.getTopology()}_VOLUME_TIMEOUT_${n}`))})),e.length&&Yt.warn("There is silent participant, send callSpecError"),this._volumeTimeout=0}},Un=class extends b{constructor(e,t,n){super(),this._mediaSource=null,this._conversation=null,this._state="IDLE",this._participantState=Y.CALLED,this._participants={},this._transport=null,this._debugInfo=null,this._volumesDetector=null,this._speakerDetector=null,this._localVolumeDetector=null,this._specListener=null,this._activeSpeakerId=null,this._lastSignalledActiveSpeakerId=null,this._serverSettings={camera:null,screenSharing:null},this._lastStalled={},this._remoteAllStalled=!1,this._audioFix=null,this._streamByStreamId=new Map,this._streamIdByStreamDescription=new Map,this._streamWaitTimerByStreamDescription=new Map,this._sequenceNumberByStreamDescription=new Map,this._cooldownTimestampByStreamDescription=new Map,this._cooldownQueueCleanupTimer=null,Oe.create(e,n),this._api=e,this._signaling=t,this._onUnload=()=>{this._conversation&&this._api&&this._api.hangupConversation(this._conversation.id),Oe.destroy()},window.addEventListener("unload",this._onUnload),this._audioOutput=new class{constructor(){this._output=null,this._volume=1,this._features={setSinkId:!!Audio.prototype.setSinkId}}add(e){this.destroy(),this._output={},this._output.audioTrack=e,this._initAudioElement()}remove(e){!this._output||this._output.audioTrack!==e||this.destroy()}get volume(){return this._volume}set volume(e){this._volume=Math.max(0,Math.min(1,e)),this._output&&this._output.audioElement&&(this._output.audioElement.volume=this._volume)}_initAudioElement(){var e;if(!(null==(e=this._output)?void 0:e.audioTrack))return;let t="Safari"!==Ct.browserName(),n=document.createElement(t?"audio":"video");n.muted=!1,n.volume=this._volume,n.preload="auto";let r=()=>{Yt.warn("Error on play audio"),Kt.onAutoplayError()},o=e=>{n.srcObject=new MediaStream([e]),n.load();let t=n.play();t?t.catch(r):r()},i=()=>{var e;Yt.debug("Recover audio playback");let t=null==(e=this._output)?void 0:e.audioTrack;t?o(t):Yt.warn("Broken audio track")};n.onpause=i,n.onstalled=i,n.onerror=i,o(this._output.audioTrack),this._output.audioElement=n}_stopAudioElement(){var e,t,n;(null==(e=this._output)?void 0:e.audioElement)&&(this._output.audioElement.pause(),this._output.audioElement.srcObject=null),null==(n=null==(t=this._output)?void 0:t.audioTrack)||n.stop()}destroy(){!this._output||(this._stopAudioElement(),this._output=null)}changeOutput(){return y(this,null,(function*(){var e,t,n;try{if(!this._features.setSinkId)throw new Error('Feature "setSinkId" is not supported');if(!(null==(e=this._output)?void 0:e.audioElement))throw new Error("Audio Element is not initialized");let r=Ct.getSavedOutput();r&&(yield null==(n=(t=this._output.audioElement).setSinkId)?void 0:n.call(t,r.deviceId))}catch(e){throw Oe.log(ne.ERROR,"change_output"),Yt.error("Output change failed",e),e}}))}},Nt.videoTracksCount>0&&(this._cooldownQueueCleanupTimer=window.setInterval(this._cleanupCooldownQueue.bind(this),1e3))}static current(){return Un._current}static hangupAfterInit(){Un._activationMutex&&!Un._current&&(Un._delayedHangup=!0)}static id(){var e,t;return(null==(t=null==(e=Un._current)?void 0:e._conversation)?void 0:t.id)||null}onStart(e,t,n,r="",o=!1,i=!1){return y(this,null,(function*(){if(Un._activationMutex)throw Oe.log(ne.ERROR,"startCall"),Yt.warn("Conversation: there is already running activation"),new Ve(H.FAILED);Un._activationMutex=!0;try{this._mediaSource=this._createMediaSource(),yield this._mediaSource.request(n);let a=this._mediaSource.getMediaSettings();t===D.CHAT||e.length>1?this._logWithMediaSettings(ne.OUTGOING_MULTIPARTY_CALL,a):this._logWithMediaSettings(ne.OUTGOING_CALL,a);let s=yield this._startConversation(e,t,T.OUTGOING,n,r,o,i);if(!this._conversation)throw new Ve(H.UNKNOWN_ERROR);if(this._participantState=Y.ACCEPTED,this._signaling.changeMediaSettings(a),yield this._registerParticipants(s.conversation.participants),this._processConnectionData(s),this._allocateTransport(),this._createSpeakerDetector(),this._createSpecListener(),this._signaling.readyToSend(),Un._delayedHangup)throw new Ve(H.CANCELED);Yt.debug("Outgoing call",{opponentIds:e,opponentType:t,mediaOptions:n});let c,l=Object.values(this._participants);return Nt.batchParticipantsOnStart&&(c=Xe.mapSharedParticipants(l)),Kt.onLocalStream(this._mediaSource.getStream(),this._mediaSource.getMediaSettings()),Kt.onConversation(this._conversation.externalId,this._conversation.mediaModifiers,this._conversation.muteStates,c),Kt.onLocalStatus(Ft.WAITING),this._toggleJoinAvailability(),this._changeFeatureSet(),this._changeNeedRate(),Un._current=this,this._conversation.concurrent?yield this._acceptConcurrent():Nt.batchParticipantsOnStart||this._setParticipantsStatus(l,Ft.WAITING),this._conversation}catch(e){throw this._close(e,"Unable to start conversation"),e}finally{Un._activationMutex=!1}}))}onJoin(e){return y(this,null,(function*(){var t;if(Un._activationMutex)throw Oe.log(ne.ERROR,"joinCall"),Yt.warn("Conversation: there is already running activation"),new Ve(H.FAILED);Un._activationMutex=!0,this._state="PROCESSING";try{let n=!!(null==(t=e.observedIds)?void 0:t.length);this._mediaSource=this._createMediaSource(),yield this._mediaSource.request(e.mediaOptions,!n);let r=this._mediaSource.getMediaSettings();this._logWithMediaSettings(ne.JOIN_CONVERSATION,r);let o=yield this._joinConversation(e);if(!this._conversation)throw new Ve(H.UNKNOWN_ERROR);return this._conversation.observer=n,Kt.onLocalStream(this._mediaSource.getStream(),r),this._conversation.waitingHall?(Yt.log("In waiting hall"),Un._current=this,Un._activationMutex=!1,this._signaling.readyToSend(),Kt.onLocalStatus(Ft.WAITING_HALL),this._conversation):this._onJoinPart2(o)}catch(e){throw Un._activationMutex=!1,this._close(e,"Unable to join conversation"),e}}))}_onJoinPart2(e){return y(this,null,(function*(){Yt.debug("Join conversation part 2"),Un._activationMutex=!0;try{if(this._participantState=Y.ACCEPTED,!this._conversation||!this._mediaSource)throw new Ve(H.UNKNOWN_ERROR);if(this._conversation.observer||this._signaling.changeMediaSettings(this._mediaSource.getMediaSettings()),yield this._registerParticipants(e.conversation.participants),this._processConnectionData(e),this._allocateTransport(),this._createSpeakerDetector(),this._createSpecListener(),this._signaling.readyToSend(),Un._delayedHangup)throw new Ve(H.CANCELED);let t,n=Object.values(this._participants);return Nt.batchParticipantsOnStart&&(t=Xe.mapSharedParticipants(n)),Kt.onConversation(this._conversation.externalId,this._conversation.mediaModifiers,this._conversation.muteStates,t),Kt.onLocalStatus(Ft.WAITING),this._toggleJoinAvailability(),this._changeNeedRate(),this._state="ACTIVE",this._changeFeatureSet(),Un._current=this,Nt.batchParticipantsOnStart||this._setParticipantsStatus(n,Ft.WAITING),this._openTransport(n,!1),this._conversation}catch(e){throw this._close(e,"Unable to join conversation"),e}finally{Un._activationMutex=!1}}))}onPush(e){return y(this,arguments,(function*(e,t=de.USER,n){if(Un._activationMutex)throw Yt.warn("Conversation: there is already running activation"),new Ve(H.REJECTED);Un._activationMutex=!0;try{let r=yield this._prepareConversation(e,t,n);if(this._mediaSource=this._createMediaSource(),!this._conversation)throw new Ve(H.UNKNOWN_ERROR);if(!r.conversation.participants.find((e=>{var t;return e.state===Y.CALLED&&e.id===(null==(t=this._conversation)?void 0:t.userId)})))throw Yt.log("Push rejected (there is an active call)"),Oe.log(ne.PUSH,"rejected"),new Ve(H.REJECTED);if(yield this._registerParticipants(r.conversation.participants),this._processConnectionData(r),this._allocateTransport(),this._createSpeakerDetector(),this._createSpecListener(),this._signaling.readyToSend(),Oe.log(ne.PUSH,"accepted"),Un._current=this,Un._delayedHangup)throw new Ve(H.CANCELED);Un._activationMutex=!1}catch(e){throw Un._activationMutex=!1,this._close(e,"Unable to handle inbound call push"),e}}))}_isInWaitingHall(e){if(!e.conversation||(e.conversation.options||[]).indexOf(M.WAITING_HALL)<0)return!1;let t=(e.conversation.participants||[]).find((t=>Xe.comparePeerId(t.peerId,e.peerId)));return t&&t.restricted||!1}_acceptConcurrent(){return y(this,null,(function*(){if(!this._mediaSource||!this._conversation)throw new Ve(H.UNKNOWN_ERROR);this._state="PROCESSING";let e=this._mediaSource.getMediaSettings();this._logWithMediaSettings(ne.ACCEPT_CONCURRENT,e),Yt.debug("Concurrent call",{conversationId:this._conversation.id});try{yield this._signaling.acceptCall(this._mediaSource.getMediaSettings()),Kt.onCallAccepted(),this._state="ACTIVE",this._participantState=Y.ACCEPTED,this._changeFeatureSet(),this._openTransport(Object.values(this._participants),!0)}catch(e){this._close(e,"Unable to accept concurrent call")}}))}accept(e){return y(this,null,(function*(){if("IDLE"!==this._state)throw Oe.log(ne.ERROR,"acceptIncoming"),Yt.error("Unable to accept a call - invalid state"),new Error("Unable to accept a call - invalid state");if(!this._mediaSource||!this._conversation)throw new Ve(H.UNKNOWN_ERROR);this._state="PROCESSING",Yt.debug("Accept incoming call",e);try{yield this._mediaSource.request(e);let t=this._mediaSource.getMediaSettings();this._logWithMediaSettings(ne.ACCEPT_INCOMING,t),this._signaling.changeMediaSettings(t),yield this._signaling.acceptCall(t),this._participantState=Y.ACCEPTED;let n,r=Object.values(this._participants);Nt.batchParticipantsOnStart&&(n=Xe.mapSharedParticipants(r)),Kt.onCallAccepted(),Kt.onLocalStream(this._mediaSource.getStream(),t),Kt.onConversation(this._conversation.externalId,this._conversation.mediaModifiers,this._conversation.muteStates,n),Kt.onLocalStatus(Ft.WAITING),this._toggleJoinAvailability(),this._changeNeedRate();let o=Object.values(this._conversation.muteStates);return(o.includes(G.MUTE)||o.includes(G.MUTE_PERMANENT))&&(yield this._processMuteState(Object.keys(this._conversation.muteStates))),this._state="ACTIVE",this._changeFeatureSet(),Nt.batchParticipantsOnStart||this._setParticipantsStatus(r,Ft.WAITING),this._openTransport(r,!0),this._conversation}catch(e){throw this._close(e,"Unable to accept call"),e}}))}decline(){return y(this,null,(function*(){var e;if("IDLE"!==this._state)throw Oe.log(ne.ERROR,"declineIncoming"),Yt.error("Unable to decline a call - invalid state"),new Error("Unable to decline a call - invalid state");this._state="PROCESSING",Yt.debug("Decline incoming call"),this._logWithMediaSettings(ne.DECLINE_INCOMING,null==(e=this._mediaSource)?void 0:e.getMediaSettings()),this._participantState=Y.HUNGUP,this._signaling.ready&&(yield this._signaling.hangup(H.REJECTED)),this._close(new Ve(H.REJECTED))}))}hangup(){return y(this,null,(function*(){Yt.debug("Hangup");let e="ACTIVE"===this._state?H.HUNGUP:H.CANCELED;Oe.log(ne.HANGUP,e),this._signaling.ready?(yield this._signaling.hangup(e),this._close(new Ve(e))):Kt.onHangup(new Ve(H.HUNGUP),this._conversation&&this._conversation.id)}))}addParticipant(e,t){return y(this,null,(function*(){if(!this._signaling.ready)return void this._close(new Ve(H.UNKNOWN_ERROR),"Unable to add participant");let n=yield this._signaling.addParticipant(e,t),r=null;"error"===n.type&&(r="call-unfeasible"===n.error?n.status:H.UNKNOWN_ERROR);let o=n.participant;yield this._onAddParticipant(Xe.composeId(o),o,r)}))}removeParticipant(e,t=!1){return y(this,null,(function*(){this._signaling.ready&&(yield this._signaling.removeParticipant(e,t),this._onRemoveParticipant(e))}))}setVolume(e){this._audioOutput.volume=e}updateStatisticsInterval(){this._transport&&this._transport.updateStatisticsInterval()}_openTransport(e,t){var n;if(!this._transport)return;let r=[];for(let n of e)(n.state===Y.CALLED||n.state===Y.ACCEPTED)&&(this._transport.isAllocated(n.id)||this._transport.allocate(n.id,t)),n.state===Y.ACCEPTED&&r.push(n.id);r.length&&this._transport.open(r,null,!!(null==(n=this._conversation)?void 0:n.observer))}_close(e,t){t&&Yt.error(t,e),Yt.debug("Close conversation",e),e.error?this._signaling.ready&&this._signaling.hangup(H.FAILED):Oe.log(ne.ERROR,e.hangup),Un._activationMutex=!1;let n=this._conversation&&this._conversation.id;return-1!==[H.CANCELED,H.NOT_FRIENDS,H.CALLEE_IS_OFFLINE,H.CALLER_IS_BLOCKED].indexOf(e.hangup)||e.hangup===H.REJECTED&&!e.remote?(Kt.onHangup(e,n),void this.destroy()):(e.hangup!==H.HUNGUP||e.remote&&this._participantState!==Y.CALLED)&&(e.hangup!==H.MISSED||e.remote)?e.hangup===H.SOCKET_CLOSED&&Un._current&&!this._conversation?(this._cleanupSignaling(),void this._cleanupMediaSource()):e.hangup!==H.BUSY||e.remote?(this._state="CLOSE",this._participantState=Y.HUNGUP,this._changeFeatureSet(),this._cleanupMediaSource(),this._cleanupParticipants(),this._cleanupParticipantAgnosticStreams(),this._cleanupTransport(),this._cleanupSpeakerDetector(),this._cleanupSpecListener(),this._cleanupSignaling(),this._api.cleanup(),Oe.destroy(),this._conversation=null,Un._current=null,Un._delayedHangup=!1,Kt.onHangup(e||new Ve(H.UNKNOWN_ERROR),n),void(null!==this._cooldownQueueCleanupTimer&&(window.clearInterval(this._cooldownQueueCleanupTimer),this._cooldownQueueCleanupTimer=null))):(this._cleanupSignaling(),void this._cleanupMediaSource()):(Kt.onHangup(e,n),void this.destroy())}destroy(){let e=this._conversation&&this._conversation.id;Yt.debug("Destroy conversation",{conversationId:e}),this._cleanupMediaSource(),this._cleanupParticipants(),this._cleanupParticipantAgnosticStreams(),this._cleanupTransport(),this._cleanupSpeakerDetector(),this._cleanupSpecListener(),this._cleanupSignaling(),this._api.cleanup(),this._cleanupListeners(),Oe.destroy(),this._conversation=null,Un._current=null,Un._delayedHangup=!1,null!==this._cooldownQueueCleanupTimer&&(window.clearInterval(this._cooldownQueueCleanupTimer),this._cooldownQueueCleanupTimer=null)}_getConversationParams(e){return y(this,null,(function*(){let t=yield this._api.getConversationParams(e);Yt.debug("Api.getConversationParams",t);let n=[],{turn_server:r,stun_server:o}=t;if(o&&n.push(o),r){let e=r.urls.filter(((e,t,n)=>n.indexOf(e)===t));e.push(`${e[e.length-1]}?transport=tcp`),n.push({urls:e,username:r.username,credential:r.credential})}return Nt.iceServers=n,Nt.wssBase=t.endpoint,Nt.wssToken=t.token,t.client_type&&(Nt.clientType=t.client_type),t}))}_startConversation(e,t,n,r,o="",i=!1,a=!1){return y(this,null,(function*(){let s=Xe.uuid();Yt.debug("Conversation: start",{conversationId:s,opponentIds:e,opponentType:t,direction:n});let c=r.includes(K.VIDEO),l=yield this._api.startConversation(s,e,t,c,o,i,a);Yt.debug("Api.startConversation",l),yield this._getConversationParams(l.id);let u=yield this._connectSignaling(X.START,l);return yield this._setConversation(l,u,n),u}))}_joinConversation(e){return y(this,null,(function*(){let{conversationId:t,mediaOptions:n,chatId:r,joinLink:o,observedIds:i}=e;Yt.debug("Conversation: join",{conversationId:t,joinLink:o,observedIds:i});let a,s=n.includes(K.VIDEO);if(t)a=yield this._api.joinConversation(t,s,r);else{if(!o)throw new Ve(H.UNKNOWN_ERROR);a=yield this._api.joinConversationByLink(o,s,i)}Yt.debug("Api.joinConversation",a),yield this._getConversationParams(a.id);let c=yield this._connectSignaling(X.JOIN,a);return yield this._setConversation(a,c,T.JOINING),c}))}_prepareConversation(e){return y(this,arguments,(function*(e,t=de.USER,n){Yt.debug("Conversation: push",{conversationId:e,type:t,peerId:n});let r=this._api.getUserId();if(!r)throw new Ve(H.UNKNOWN_ERROR);let o=(yield this._getConversationParams(e)).device_idx||0,i={id:e,peerId:n,endpoint:`${Nt.wssBase}?userId=${r}&entityType=${t}&deviceIdx=${o}&conversationId=${e}&token=${Nt.wssToken}`,is_concurrent:!1,p2p_forbidden:!1,device_idx:o},a=yield this._connectSignaling(X.ACCEPT,i);return!Un._current||Un._current._participantState!==Y.ACCEPTED&&Un._current._participantState!==Y.CALLED?(Un._current&&(Un._current.destroy(),Un._current=null),yield this._setConversation(i,a,T.INCOMING,t),a):(Yt.log("Push rejected (busy)"),Oe.log(ne.PUSH,"busy"),this._signaling.ready&&this._signaling.hangup(H.BUSY),Promise.reject({hangup:H.BUSY}))}))}_createParticipant(e){return y(this,null,(function*(){let t=Object.assign({id:null,externalId:null,mediaSettings:Be(),participantState:{},state:Y.CALLED,status:null,remoteStream:null,mediaSource:null,platform:null,clientType:null,roles:[],networkRating:1,lastRequestedLayouts:{},muteStates:{},unmuteOptions:[]},e);if(e.externalId){let n=Xe.decomposeParticipantId(t.id).compositeUserId;this._api.cacheExternalId(n,e.externalId)}else t.externalId=yield this._getParticipantId(t.id);return t}))}_getParticipantId(e){return y(this,null,(function*(){try{let t=Xe.decomposeParticipantId(e),n=yield this._api.userId(t.compositeUserId);return Object.assign({deviceIdx:t.deviceIdx},n)}catch(e){throw this._close(new Ve(H.NETWORK_ERROR),e),e}}))}_setConversation(e,t,n){return y(this,arguments,(function*(e,t,n,r=de.USER){let o=t.conversation.participants.map((e=>e.id));yield this._api.prepareUserIds(o);let i=this._api.getUserId(),a=e.device_idx||0;if(!i){let e=(t.conversation.participants||[]).find((e=>Xe.comparePeerId(e.peerId,t.peerId)));if(!e)throw new Ve(H.UNKNOWN_ERROR);i=Number(e.id),e.idType&&(r=e.idType),e.deviceIdx&&(a=e.deviceIdx),this._api.setUserId(i)}let s=Xe.composeParticipantId(i,r,a),c=yield this._getParticipantId(s);this._conversation={userId:i,compositeUserId:s,externalId:c,acceptTime:t.conversation.acceptTime,features:t.conversation.features||[],id:t.conversation.id||e.id,participantsLimit:t.conversation.participantsLimit||30,topology:t.conversation.topology||kn.DIRECT,direction:n,concurrent:t.isConcurrent||e.is_concurrent||!1,needRate:!1,chatId:t.conversation.multichatId,roles:[],recordInfo:null,joinLink:e.join_link,pinnedParticipantId:null,mediaModifiers:t.mediaModifiers,options:[],muteStates:{},unmuteOptions:[],networkRating:1,waitingHall:this._isInWaitingHall(t),observer:!1},this._signaling.setConversationId(e.id),e.p2p_forbidden&&(Nt.forceRelayPolicy=e.p2p_forbidden),Oe.log(ne.RELAY_POLICY,Nt.forceRelayPolicy?"1":"0"),this._changeFeatureSet(),this._logDevices()}))}_updateConversation(e){if(!this._conversation)throw new Ve(H.UNKNOWN_ERROR);this._conversation.acceptTime=e.conversation.acceptTime,this._conversation.features=e.conversation.features||[],this._conversation.participantsLimit=e.conversation.participantsLimit||30,this._conversation.topology=e.conversation.topology||kn.DIRECT,this._conversation.concurrent=e.isConcurrent||!1,this._conversation.chatId=e.conversation.multichatId,this._conversation.mediaModifiers=e.mediaModifiers,this._conversation.waitingHall=!1}_createMediaSource(){let e=new Ke;return this.subscribe(e,He.SOURCE_CHANGED,this._onLocalMediaStreamChanged.bind(this)),this.subscribe(e,He.SCREEN_STATUS,this._onScreenSharingStatus.bind(this)),this._audioFix=new rn(e),e}_connectSignaling(e,t){return y(this,null,(function*(){return this._signaling.setEndpoint(t.endpoint),this.subscribe(this._signaling,J.NOTIFICATION,this._onSignalingNotification.bind(this)),this.subscribe(this._signaling,J.FAILED,this._onSignalingFailed.bind(this)),this.subscribe(this._signaling,J.RECONNECT,this._onSignalingReconnect.bind(this)),this._signaling.connect(e,t)}))}_registerParticipants(e){return y(this,null,(function*(){if(this._conversation)for(let t of e){let e=Xe.composeId(t);e!==this._conversation.compositeUserId?t.state!==Y.HUNGUP&&t.state!==Y.REJECTED?(this._participants[e]=yield this._createParticipant({id:e,externalId:t.externalId&&qt.fromSignaling(t.externalId,t.deviceIdx||0),mediaSettings:Be(t.mediaSettings),participantState:Xe.mapParticipantState(t),state:t.state,roles:t.roles||[],status:Nt.batchParticipantsOnStart?Ft.WAITING:null,muteStates:t.muteStates||{},unmuteOptions:t.unmuteOptions||[]}),t.roles&&t.roles.length&&(Yt.debug(`Roles for participant [${e}] changed: ${t.roles}`),Kt.onRolesChanged(this._participants[e].externalId,t.roles))):this._participants[t.id]&&this._removeParticipant(this._participants[t.id],H.HUNGUP):(this._conversation.roles=t.roles||[],this._conversation.roles.length&&(Yt.debug(`Local roles changed: ${t.roles}`),Kt.onLocalRolesChanged(this._conversation.roles)),t.muteStates&&(yield this._onMuteParticipant({muteStates:t.muteStates,unmuteOptions:t.unmuteOptions,mediaOptions:Object.keys(t.muteStates)})))}}))}_processConnectionData(e){Xe.isEmptyObject(this._conversation.muteStates)&&e.conversation.muteStates&&this._onMuteParticipant({muteStates:e.conversation.muteStates,unmuteOptions:e.unmuteOptions,mediaOptions:Object.keys(e.conversation.muteStates),muteAll:!0}),e.conversation.pinnedParticipantId&&this._onPinParticipant(e.conversation.pinnedParticipantId),this._onRecordInfo(e.conversation.recordInfo),this._onOptionsChanged(e.conversation.options),e.chatRoom&&e.chatRoom.totalCount&&this._onChatRoomUpdated(O.ATTENDEE,e.chatRoom.totalCount,e.chatRoom.firstParticipants)}_allocateTransport(){if(!this._conversation||!this._mediaSource)return;this._transport=new Rn(this._conversation.topology,this._signaling,this._mediaSource,this._serverSettings),this._debugInfo=new on,this.subscribe(this._transport,On.STATE_CHANGED,this._onTransportStateChanged.bind(this)),this.subscribe(this._transport,On.LOCAL_STATE_CHANGED,this._onTransportLocalStateChanged.bind(this)),this.subscribe(this._transport,On.REMOTE_TRACK_ADDED,this._onRemoteTrackAdded.bind(this)),this.subscribe(this._transport,On.REMOTE_TRACK_REMOVED,this._onRemoteTrackRemoved.bind(this)),this.subscribe(this._transport,On.REMOTE_ALL_STALL,this._onRemoteAllStall.bind(this)),this.subscribe(this._transport,On.REMOTE_DATA_STATS,this._onRemoteDataStats.bind(this)),this.subscribe(this._transport,On.SIGNALLED_STALLED_PARTICIPANTS,this._onRemoteSignalledStall.bind(this)),this.subscribe(this._transport,On.ACTIVE_PARTICIPANTS_NO_SIGNAL,this._onRemoteActivityNoSignal.bind(this)),this.subscribe(this._transport,On.TOPOLOGY_CHANGED,this._onTopologyChanged.bind(this)),this.subscribe(this._transport,On.NETWORK_STATUS,this._onNetworkStatus.bind(this)),this.subscribe(this._transport,On.REMOTE_STREAM_SECOND,this._onRemoteStreamSecond.bind(this)),this.subscribe(this._transport,On.PEER_CONNECTION_CLOSED,this._onPeerConnectionClosed.bind(this));let e=this._conversation.direction===T.OUTGOING&&!this._conversation.concurrent;for(let t of Object.values(this._participants))(t.state===Y.ACCEPTED||t.state===Y.CALLED)&&this._transport.allocate(t.id,e)}_createSpeakerDetector(){this._transport&&(this._volumesDetector=new Ln(this._transport),this.subscribe(this._volumesDetector,Mn.VOLUMES_DETECTED,this._onVolumesDetected.bind(this)),this._speakerDetector=new Nn(this._volumesDetector,this._transport),this.subscribe(this._speakerDetector,xn.SPEAKER_CHANGED,this._onSpeakerChanged.bind(this)),this._localVolumeDetector=new sn(this._mediaSource))}_createSpecListener(){this._transport&&this._volumesDetector&&(this._specListener=new Bn(this._transport,this._volumesDetector,this._participants))}_logDevices(){let e=Ct.getCameras().length,t=Ct.getMicrophones().length;Yt.debug("Cameras: "+e+(Ct.hasCameraPermission()?"✔":"✖")+", Microphones: "+t+(Ct.hasMicrophonePermission()?"✔":"✖")),Oe.log(ne.DEVICES,`${e}_${t}`)}_logWithMediaSettings(e,t){Oe.log(e,[(null==t?void 0:t.isAudioEnabled)&&"audio",(null==t?void 0:t.isVideoEnabled)&&"video"].filter(Boolean).join("_"))}_removeParticipant(e,t){var n;e.state===Y.CALLED||e.state===Y.ACCEPTED||"CLOSE"===this._state||!this._participants[e.id]||(t===H.HUNGUP?this._setParticipantsStatus([e],Ft.HANGUP):this._setParticipantsStatus([e],Ft.ERROR,t),null==(n=e.mediaSource)||n.disconnect(),this._conversation&&this._conversation.pinnedParticipantId===e.id&&(this._conversation.pinnedParticipantId=null),this.updateDisplayLayout([{uid:e.externalId,mediaType:Xt.CAMERA,stopStream:!0}]),delete this._participants[e.id],Kt.onRemoteRemoved(e.externalId))}_cleanupListeners(){this.unsubscribe(),window.removeEventListener("unload",this._onUnload)}_cleanupMediaSource(){this._mediaSource&&(this._mediaSource.destroy(),this._mediaSource=null)}_cleanupParticipants(){Object.values(this._participants).forEach((e=>{var t,n,r;null==(t=e.remoteStream)||t.getTracks().forEach((e=>e.stop())),null==(n=e.secondStream)||n.getTracks().forEach((e=>e.stop())),null==(r=e.mediaSource)||r.disconnect()})),this._participants={},this._audioOutput&&this._audioOutput.destroy()}_cleanupParticipantAgnosticStreams(){Yt.debug("cleaning up participant-agnostic streams"),this._streamByStreamId.forEach((e=>{e.getTracks().forEach((e=>{e.stop()}))})),this._streamByStreamId=new Map,this._streamWaitTimerByStreamDescription.forEach((e=>{window.clearTimeout(e)})),this._streamWaitTimerByStreamDescription=new Map,this._streamIdByStreamDescription=new Map,this._sequenceNumberByStreamDescription=new Map,this._cooldownTimestampByStreamDescription=new Map}_cleanupTransport(){this._transport&&(this._transport.destroy(),this._transport=null),this._debugInfo&&(this._debugInfo=null)}_cleanupSpeakerDetector(){this._speakerDetector&&(this._speakerDetector.destroy(),this._speakerDetector=null),this._volumesDetector&&(this._volumesDetector.destroy(),this._volumesDetector=null),this._localVolumeDetector&&(this._localVolumeDetector.destroy(),this._localVolumeDetector=null)}_cleanupSpecListener(){this._specListener&&(this._specListener.destroy(),this._specListener=null)}_cleanupSignaling(){this._signaling.close(),this._signaling.cleanup()}_onAddParticipant(e,t,n){return y(this,null,(function*(){Yt.debug(`Add new participant [${e}]`);let r=this._participants[e];!r||r.state!==Y.ACCEPTED&&r.state!==Y.CALLED?(r||(this._participants[e]=yield this._createParticipant({id:e,externalId:t.externalId&&qt.fromSignaling(t.externalId,t.deviceIdx||0),mediaSettings:Be(t.mediaSettings),state:t.state,roles:t.roles||[],muteStates:t.muteStates||{},unmuteOptions:t.unmuteOptions||[]}),r=this._participants[e]),this._setParticipantsStatus([r],Ft.WAITING),n?(r.state=Y.HUNGUP,this._removeParticipant(r,n)):this._transport&&(r.state=Y.CALLED,this._transport.allocate(r.id,!0),Oe.log(ne.ADD_PARTICIPANT),this._invokeRolesChangedCallbackIfNeeded(r))):Yt.warn(`Participant [${r.id}:${r.state}] is already in conversation`)}))}_onRemoveParticipant(e){Yt.debug(`Remove participant [${e}]`);let t=[];for(let n=0;n<=15;n++){let r=Xe.compose(e,n),o=this._participants[r];o&&t.push(o)}if(t.length){if(this._transport)for(let e of t)this._transport.close(e.id);Oe.log(ne.REMOVE_PARTICIPANT)}else Yt.warn(`Participant [${e}] isn't in conversation`)}changeDevice(e){return y(this,null,(function*(){return"audiooutput"===e?this._audioOutput.changeOutput():this._mediaSource?("audioinput"===e&&(this._audioFix=new rn(this._mediaSource)),this._mediaSource.changeDevice(e)):Promise.reject(W.UNKNOWN)}))}toggleScreenCapturing(e){return y(this,null,(function*(){return this._mediaSource?this._mediaSource.toggleScreenCapturing(e):Promise.reject(W.UNKNOWN)}))}setVideoStream(e,t=!1){return y(this,null,(function*(){if(this._mediaSource)return this._mediaSource.setVideoStream(e,t)}))}setAudioStream(e){return y(this,null,(function*(){if(this._mediaSource)return this._mediaSource.setAudioStream(e)}))}toggleLocalVideo(e){return y(this,null,(function*(){if(this._mediaSource)return Oe.log(ne.MEDIA_STATUS,e?"video_1":"video_0"),this._mediaSource.toggleVideo(e)}))}toggleLocalAudio(e){return y(this,null,(function*(){if(this._mediaSource)return Oe.log(ne.MEDIA_STATUS,e?"audio_1":"audio_0"),this._mediaSource.toggleAudio(e)}))}changePriorities(e){return y(this,null,(function*(){if(e.length<2||!this._signaling.ready)return;let t={},n={};for(let t of e){let e="object"==typeof t.uid?t.uid:qt.fromId(t.uid);n[qt.toString(e)]=t.priority}for(let e of Object.values(this._participants)){let r=qt.toString(e.externalId);n.hasOwnProperty(r)&&(t[e.id]=n[r])}yield this._signaling.changePriorities(t)}))}changeParticipantState(e){return y(this,null,(function*(){for(let[t,n]of Object.entries(e))if(t.length>5||n.length>5)throw new Error("key/value max length is 5 chars, mappings with empty values (null or empty string) are discarded");yield this._signaling.changeParticipantState(e)}))}requestKeyFrame(e){return y(this,null,(function*(){let t={};return t[Qt(e)]="kf",this._signaling.updateDisplayLayout(t)}))}updateDisplayLayout(e){return y(this,null,(function*(){if(e.length<1||!this._signaling.ready)return;Yt.log(`Update display layout [${this._signaling.getNextCommandSequenceNumber()}]`,e);let t={};for(let n of e){let e="object"==typeof n.uid?n.uid:qt.fromId(n.uid),r=this._api.getCachedOkIdByExternalId(e);if(!r){let t=qt.toString(e);Yt.log(`Unknown participant external ID ${t}`);continue}let o=Xe.compose(r,e.deviceIdx),i=Qt({participantId:o,mediaType:n.mediaType,streamName:n.streamName}),a=this._participants[o];a&&(a.lastRequestedLayouts[i]=n),Un._isStopStreaming(n)?this._streamIdByStreamDescription.has(i)&&!this._cooldownTimestampByStreamDescription.has(i)&&this._cooldownTimestampByStreamDescription.set(i,Date.now()):(this._cooldownTimestampByStreamDescription.delete(i),!this._streamIdByStreamDescription.has(i)&&Nt.videoTracksCount>0&&this._streamIdByStreamDescription.set(i,null),t[i]=Un._layoutToString(n))}let n=this._cooldownTimestampByStreamDescription.keys();for(;this._streamIdByStreamDescription.size>Nt.videoTracksCount;){let e=n.next();if(e.done){Yt.error("Cannot accommodate all streaming requests: tracks available "+Nt.videoTracksCount+"; requested streams: "+Array.from(this._streamIdByStreamDescription.keys()));break}this._stopStreaming(e.value),t[e.value]=Un._layoutToString({stopStream:!0})}yield this._sendUpdateDisplayLayout(t)}))}_stopStreaming(e){if(this._cooldownTimestampByStreamDescription.delete(e),this._sequenceNumberByStreamDescription.set(e,this._signaling.getNextCommandSequenceNumber()),this._streamWaitTimerByStreamDescription.has(e)&&(Yt.log("Client asked to stop streaming before stream became available",e),window.clearTimeout(this._streamWaitTimerByStreamDescription.get(e)),this._streamWaitTimerByStreamDescription.delete(e)),this._streamIdByStreamDescription.get(e)){let t=Jt(e),n=this._participants[t.participantId];n?(!t.streamName||t.mediaType!==Xt.STREAM&&t.mediaType!==Xt.SCREEN?Kt.onRemoteStream(n.externalId,null):Kt.onRemoteLive(n.externalId,t.streamName,null),Oe.log(ne.PAT_DEALLOCATED)):Yt.log(`Cannot find participant to stop streaming: ${t.participantId}`)}this._streamIdByStreamDescription.delete(e)}_sendUpdateDisplayLayout(e){return y(this,null,(function*(){if(0===Object.keys(e).length)return;let t=yield this._signaling.updateDisplayLayout(e);if(!t)return;let n=[];for(let[e,r]of Object.entries(t.errorCodeByParticipantId||{})){let t=Jt(e),o=this._participants[t.participantId];if(o){let e;"number"!=typeof r?(Yt.warn(`Unexpected error code ${r} received for participant ${t.participantId}`),e=ae.UNKNOWN_ERROR):e=1===r?"no-available-tracks":"unknown-error",n.push({externalId:o.externalId,errorReason:e})}}if(n&&n.length)throw new Vn("Could not allocate one or more participants",n)}))}_cleanupCooldownQueue(){let e={},t=this._cooldownTimestampByStreamDescription.entries();for(;;){let n=t.next();if(n.done)break;let r=n.value;if(r[1]+1e4>Date.now())break;let o=r[0];this._stopStreaming(o),e[o]=Un._layoutToString({stopStream:!0})}this._sendUpdateDisplayLayout(e)}static _isStopStreaming(e){return e.stopStream}static _layoutToString(e){if(Un._isStopStreaming(e))return"ss";let t="";return void 0!==e.priority&&(t+="p="+e.priority),void 0!==e.width&&void 0!==e.height&&(""!==t&&(t+=":"),t+="sz="+Math.round(e.width)+"x"+Math.round(e.height)),void 0!==e.fit&&(""!==t&&(t+=":"),t+="fit="+e.fit),t}_onParticipantSourcesUpdate(e){if(this._conversation){Yt.log("Received participant sources update notification",e);for(let t of e)this._waitForStreamIfNeeded(t)}}_onParticipantPromoted(e){return y(this,null,(function*(){Yt.log("Promoted in waiting hall",!e.demote),e.demote?(Yt.log("Kicked from waiting hall"),this._close(new Ve(H.REMOVED))):(this._updateConversation(e),yield this._onJoinPart2(e))}))}_onChatRoomUpdated(e){return y(this,arguments,(function*(e,t=0,n=[]){Yt.log(`Chat room updated: ${e}`);let r=[],o=[];n.length&&(n.forEach((e=>{if(e.externalId){let t=Gt.fromSignaling(e.externalId);r.push(t),this._api.cacheExternalId(e.id.id,t)}else o.push(Xe.decomposeId(e.id.id).id)})),o.length&&!r.length&&(r=yield this._api.getExternalIdsByOkIds(o))),Kt.onChatRoomUpdated(e,t,r)}))}_waitForStreamIfNeeded(e){var t,n;let r=this._matchStreamDescription(e.participantStreamDescription);if(!r||Nt.producerScreenTrack&&r.mediaType===Xt.SCREEN)return;let o=Qt(r),i=this._sequenceNumberByStreamDescription.get(o);if(i&&i>e.sequenceNumber)return Yt.warn(`Participant ${r.participantId} received outdated PAT response: sequence number ${e.sequenceNumber}; last sent sequence number for given participant is ${i}`),void Oe.log(ne.PAT_OUTDATED_RESPONSE);let a=e.streamId,s=e.rtpTimestamp?this._getWaitingTime(a,e.rtpTimestamp):0;if(s<=0){this._streamWaitTimerByStreamDescription.delete(o);let i=r.participantId,s=this._participants[i];if(!s)return Oe.log(ne.PAT_ERROR,"participantMissing"),void Yt.error(`Could not find participant by ID: ${i}`);let c=this._streamByStreamId.get(a);if(!c)return Oe.log(ne.PAT_ERROR,"streamNotFound"),void Yt.error(`Could not find stream by ID: ${a}`);Oe.log(ne.PAT_ALLOCATED),this._streamIdByStreamDescription.set(o,a);let l=null==(t=e.participantStreamDescription)?void 0:t.mediaType;if(l===Xt.STREAM||l===Xt.MOVIE)(null==(n=e.participantStreamDescription)?void 0:n.streamName)&&Kt.onRemoteLive(s.externalId,e.participantStreamDescription.streamName,c);else{let e=(Nt.producerScreenTrack?null:s.secondStream)||c;Kt.onRemoteStream(s.externalId,e)}}else{Yt.debug(`Waiting for ${s} until stream ${a} for ${o} is switched`);let t=window.setTimeout(this._waitForStreamIfNeeded.bind(this,e),s);this._streamWaitTimerByStreamDescription.set(o,t)}}_matchStreamDescription(e){if(!e)return null;if(this._streamIdByStreamDescription.has(Qt(e)))return e;let t=e.participantId;if(e.mediaType){let e={participantId:t,mediaType:null};if(this._streamIdByStreamDescription.has(Qt(e)))return e}else{let e={participantId:t,mediaType:Xt.CAMERA};if(this._streamIdByStreamDescription.has(Qt(e)))return e;let n={participantId:t,mediaType:Xt.SCREEN};if(this._streamIdByStreamDescription.has(Qt(n)))return n}return Yt.error("Received unrequested allocation",e),null}_getWaitingTime(e,t){if(this._transport)return this._transport.getStreamWaitingTimeMs(e,t);throw new Error("transport is not initialized")}_isCallAdmin(){return!!this._conversation&&Xe.includesOneOf(this._conversation.roles,[ce.ADMIN,ce.CREATOR])}_checkAdminRole(){if(this._conversation&&!Xe.includesOneOf(this._conversation.roles,[ce.ADMIN,ce.CREATOR]))throw new Error("You don't have the required permission")}grantRoles(e,t,n){return y(this,null,(function*(){this._checkAdminRole(),yield this._signaling.grantRoles(e,t,n)}))}muteParticipant(){return y(this,arguments,(function*(e=null,t,n=[]){this._checkAdminRole(),yield this._signaling.muteParticipant(e,t,n)}))}pinParticipant(e,t){return y(this,null,(function*(){this._checkAdminRole(),yield this._signaling.pinParticipant(e,t)}))}updateMediaModifiers(e){return y(this,null,(function*(){this._signaling.ready&&this._conversation&&(this._conversation.mediaModifiers=e,yield this._signaling.updateMediaModifiers(e))}))}changeOptions(e){return y(this,null,(function*(){if(this._signaling.ready&&this._conversation){this._checkAdminRole(),yield this._signaling.changeOptions(e);let t=function(e,t){let n=new Set(e);for(let[e,r]of Object.entries(t))r?n.add(e):n.delete(e);return Array.from(n)}(this._conversation.options,e);this._onOptionsChanged(t)}}))}getWaitingHall(e,t,n){return y(this,null,(function*(){if(!this._signaling)return Promise.reject();let r=null;e&&(r=function(e){try{return JSON.parse(atob(e))}catch(t){Yt.warn("WaitingParticipant: failed convert from string",e,t)}return null}(e));let o=yield this._signaling.getWaitingHall(r,t,n);if(o.error)return Promise.reject(o.message);let i=o.participants||[],a=[],s=[],c=null;return i.length&&(i.forEach((e=>{if(e.externalId){let t=Gt.fromSignaling(e.externalId);a.push(t),this._api.cacheExternalId(e.id.id,t)}else s.push(Xe.decomposeId(e.id.id).id)})),s.length&&!a.length&&(a=yield this._api.getExternalIdsByOkIds(s)),o.hasMore&&(c=function(e){try{return btoa(JSON.stringify(e))}catch(t){Yt.warn("WaitingParticipant: failed convert to string",e,t)}return null}(i[i.length-1].id))),{participants:a,pageMarker:c,totalCount:o.totalCount||0}}))}promoteParticipant(e,t){return y(this,null,(function*(){this._signaling&&(yield this._signaling.promoteParticipant(e,t))}))}chatMessage(e,t=null){return y(this,null,(function*(){this._signaling.ready&&(yield this._signaling.chatMessage(e,t))}))}chatHistory(e){return y(this,null,(function*(){if(this._signaling.ready){let t=yield this._signaling.chatHistory(e);for(let e=t.messages.length-1;e>=0;e--){let n=t.messages[e];yield this._onChatMessage(n)}}}))}customData(e,t=null){return y(this,null,(function*(){this._signaling.ready&&(yield this._signaling.customData(e,t))}))}createJoinLink(){return y(this,null,(function*(){if(this._conversation){let e=(yield this._api.createJoinLink(this._conversation.id)).join_link;if(e)return this._conversation.joinLink=e,e}return Promise.reject()}))}removeJoinLink(){return y(this,null,(function*(){if(!this._conversation||!(yield this._api.removeJoinLink(this._conversation.id)).success)return Promise.reject();delete this._conversation.joinLink}))}addMovie(e){return y(this,null,(function*(){var t;let n={movieId:e,participantId:null==(t=this._conversation)?void 0:t.compositeUserId},r=yield this._signaling.addMovie(n);if(r.error)throw new Error(r.error);return{movieId:r.movieId,streamType:r.streamType}}))}updateMovie(e,t,n,r){return y(this,null,(function*(){var o;let i={movieId:e,participantId:null==(o=this._conversation)?void 0:o.compositeUserId};(t||0===t)&&(i.gain=t),n&&(i.offset=n),void 0!==typeof r&&(i.pause=r);let a=yield this._signaling.updateMovie(i);if(a.error)throw new Error(a.error)}))}removeMovie(e){return y(this,null,(function*(){var t;let n={movieId:e,participantId:null==(t=this._conversation)?void 0:t.compositeUserId},r=yield this._signaling.removeMovie(n);if(r.error)throw new Error(r.error)}))}startStream(e=!1,t=null,n=null,r="DIRECT_LINK",o=null){return y(this,null,(function*(){let i={movieId:n,name:t,privacy:r,groupId:o,streamMovie:!e},a=yield this._signaling.startStream(i);return a.error?Promise.reject(a.message):a}))}stopStream(){return y(this,null,(function*(){let e=yield this._signaling.stopStream();return e.error?Promise.reject():e}))}recordSetRole(e,t){return y(this,null,(function*(){let n=yield this._signaling.recordSetRole(e,t);if(n.error)throw new Error(n.error)}))}getStreamInfo(){return y(this,null,(function*(){let e=yield this._signaling.getRecordStatus();return{movieId:e.recordMovieId,preview:e.recordMoviePreviewUrl}}))}setLocalResolution(e,t,n){return y(this,null,(function*(){var r;if(e<Nt.videoMinWidth||t<Nt.videoMinHeight)throw new Error("Sizes received are less than the `videoMinWidth` or `videoMinHeight`");if(null==n?void 0:n.effect){if(n.effect.width<Nt.videoMinWidth||n.effect.height<Nt.videoMinHeight)throw new Error("Sizes of effect received are less than the `videoMinWidth` or `videoMinHeight`");Nt.videoEffectMaxHeight=n.effect.height,Nt.videoEffectMaxWidth=n.effect.width}return Nt.videoMaxWidth=e,Nt.videoMaxHeight=t,null==(r=this._mediaSource)?void 0:r.setResolution(e,t)}))}videoEffect(e){return y(this,null,(function*(){var t;return null==(t=this._mediaSource)?void 0:t.videoEffect(e)}))}_onLocalMediaStreamChanged(e){return y(this,null,(function*(){var t,n;!this._conversation||(Yt.debug("Local media stream changed",e.mediaSettings),Kt.onLocalStreamUpdate(e.mediaSettings,e.kind),this._signaling.ready&&!(null==(t=this._conversation)?void 0:t.waitingHall)&&!(null==(n=this._conversation)?void 0:n.observer)&&(yield this._signaling.changeMediaSettings(e.mediaSettings)))}))}_onScreenSharingStatus(e){return y(this,null,(function*(){var t,n;if(Yt.log("Screen sharing changed",e.track,e.mediaSettings),Nt.consumerScreenTrack){let r=e.track?new MediaStream([e.track]):null;Kt.onScreenStream(r,e.mediaSettings),this._signaling.ready&&!(null==(t=this._conversation)?void 0:t.waitingHall)&&!(null==(n=this._conversation)?void 0:n.observer)&&(yield this._signaling.changeMediaSettings(e.mediaSettings))}}))}_changeRemoteMediaSettings(e,t){Yt.debug(`Remote media settings changed [${e}]`,t);let n=this._participants[e];!n||(n.mediaSettings=t,"ACTIVE"===this._state&&Kt.onRemoteMediaSettings(n.externalId,t),this._specListener&&this._specListener.onChangeRemoteMediaSettings(e,t))}_changeRemoteParticipantState(e,t){Yt.debug(`Remote participant state changed [${e}]`,t);let n=this._participants[e];!n||(n.participantState=t||{},"ACTIVE"===this._state&&(Nt.participantStateMapped?Kt.onRemoteParticipantState(n.externalId,n.participantState):Kt.onRemoteParticipantState(n.externalId,Xe.mapLegacyParticipantState(n.participantState))))}_invokeRolesChangedCallbackIfNeeded(e){"ACTIVE"===this._state&&e.roles&&e.roles.length&&(Yt.debug(`Roles for participant [${e.id}] changed: ${e.roles}`),Kt.onRolesChanged(e.externalId,e.roles))}_onSignalingNotification(e){switch(e.notification){case ee.ACCEPTED_CALL:return this._onAcceptedCall(e);case ee.HUNGUP:return this._onHungup(e);case ee.PARTICIPANT_ADDED:return this._onAddedParticipant(e);case ee.PARTICIPANT_JOINED:return this._onJoinedParticipant(e);case ee.CLOSED_CONVERSATION:return this._onClosedConversation(e);case ee.MEDIA_SETTINGS_CHANGED:return this._onMediaSettingsChanged(e);case ee.PARTICIPANT_STATE_CHANGED:return this._onParticipantStateChanged(e);case ee.RATE_CALL_DATA:return this._onNeedRate();case ee.FEATURE_SET_CHANGED:return this._onFeatureSetChanged(e);case ee.MULTIPARTY_CHAT_CREATED:return this._onMultipartyChatCreated(e);case ee.FORCE_MEDIA_SETTINGS_CHANGE:return this._onForceMediaSettingsChange(e);case ee.SETTINGS_UPDATE:return this._onSettingsUpdate(e);case ee.VIDEO_QUALITY_UPDATE:return this._onVideoQualityUpdate(e);case ee.REGISTERED_PEER:return this._onPeerRegistered(e);case ee.SWITCH_MICRO:return this._onMicSwitched(e);case ee.CHAT_MESSAGE:return this._onChatMessage(e);case ee.CUSTOM_DATA:return this._onCustomData(e);case ee.RECORD_STARTED:return this._onRecordInfo(e.recordInfo);case ee.RECORD_STOPPED:return this._onRecordInfo(null);case ee.ROLES_CHANGED:return this._onRolesChanged(e.participantId,e.roles||[]);case ee.MUTE_PARTICIPANT:return this._onMuteParticipant(e);case ee.PIN_PARTICIPANT:return this._onPinParticipant(e.participantId,e.unpin);case ee.OPTIONS_CHANGED:return this._onOptionsChanged(e.options||[]);case ee.PARTICIPANT_SOURCES_UPDATE:return this._onParticipantSourcesUpdate(e.participantUpdateInfos);case ee.PROMOTE_PARTICIPANT:return this._onParticipantPromoted(e);case ee.CHAT_ROOM_UPDATED:return this._onChatRoomUpdated(e.eventType,e.totalCount,e.firstParticipants)}}_onSignalingReconnect(e){return y(this,null,(function*(){if(!this._conversation)return;e.conversation.acceptTime&&(this._conversation.acceptTime=e.conversation.acceptTime),e.conversation.participantsLimit&&(this._conversation.participantsLimit=e.conversation.participantsLimit),e.conversation.features&&(this._conversation.features=e.conversation.features,this._changeFeatureSet()),e.conversation.pinnedParticipantId!==this._conversation.pinnedParticipantId&&(e.conversation.pinnedParticipantId?this._onPinParticipant(e.conversation.pinnedParticipantId,!1):this._conversation.pinnedParticipantId&&this._onPinParticipant(this._conversation.pinnedParticipantId,!0)),e.conversation.state;let t=null;if(e.conversation.participants){let n=Object.keys(this._participants),r=[];for(let n of e.conversation.participants){let e=Xe.composeId(n),o=n.roles||[];if(e===this._conversation.compositeUserId){t=Be(n.mediaSettings),le(this._conversation.roles,o)||this._onRolesChanged(e,o);continue}r.push(e);let i=this._participants[e];if(i){let t=Be(n.mediaSettings);Ne(t,i.mediaSettings)||this._changeRemoteMediaSettings(e,t);let r=Xe.mapParticipantState(n),a=i.participantState;Xe.isEqualParticipantState(r,a)||this._changeRemoteParticipantState(e,r),le(o,i.roles)||this._onRolesChanged(i.id,o)}else yield this._onJoinedParticipant({participantId:n.id,participant:n,mediaSettings:n.mediaSettings})}for(let e of n)r.indexOf(e)<0&&this._removeParticipant(this._participants[e],H.HUNGUP)}this._onMuteParticipant({muteStates:e.conversation.muteStates,unmuteOptions:e.unmuteOptions,mediaOptions:[]},t),this._onRecordInfo(e.conversation.recordInfo),this._onOptionsChanged(e.conversation.options)}))}_onSignalingFailed(e){Yt.error("Signaling failed",e),this._close(e)}_onAcceptedCall(e){return y(this,null,(function*(){let t=Xe.composeMessageId(e),n=Xe.getPeerIdString(e.peerId);if(Yt.debug(`Participant accepted call [${t}]`),this._conversation&&t===this._conversation.compositeUserId)return void this._close(new Ve(H.MISSED),"Call accepted on other device");let r=this._participants[t];r||(this._participants[t]=yield this._createParticipant({id:t,mediaSettings:Be(e.mediaSettings)}),r=this._participants[t]),r.state=Y.ACCEPTED,r.mediaSettings=Be(e.mediaSettings),this._logWithMediaSettings(ne.ACCEPTED_OUTGOING,r.mediaSettings),this._conversation&&this._conversation.direction===T.OUTGOING&&("IDLE"===this._state||"PROCESSING"===this._state)&&(this._state="ACTIVE",this._changeFeatureSet()),"ACTIVE"===this._state&&this._transport&&this._transport.open([r.id],n),this._changeRemoteMediaSettings(t,r.mediaSettings),this._changeRemoteParticipantState(t)}))}_onHungup(e){Yt.debug(`Participant hungup [${e.participantId}]`,{reason:e.reason});let t=Xe.composeMessageId(e);if(this._conversation&&this._conversation.compositeUserId===t)return void this._close(new Ve(e.reason));let n=this._participants[t];n?(this._transport&&this._transport.close(t),n.state=e.reason===H.REJECTED?Y.REJECTED:Y.HUNGUP,"CLOSE"!==this._state&&this._removeParticipant(n,H.HUNGUP)):Yt.warn(`Participant [${t}] isn't in conversation`)}_onAddedParticipant(e){return y(this,null,(function*(){var t,n;Yt.debug(`Participant added [${e.participantId}]`);let r=Xe.composeMessageId(e),o=this._participants[r];o&&o.state!==Y.HUNGUP&&o.state!==Y.REJECTED?Yt.debug(`Participant [${r}] is already in conversation and is active`):(o||(this._participants[r]=yield this._createParticipant({id:r,externalId:e.participant.externalId&&qt.fromSignaling(e.participant.externalId,e.participant.deviceIdx||0),mediaSettings:Be(e.participant.mediaSettings),state:e.participant.state,participantState:Xe.mapParticipantState(e.participant),roles:e.participant.roles||[],muteStates:e.participant.muteStates||{},unmuteOptions:e.participant.unmuteOptions||[]}),o=this._participants[r]),o.state=Y.CALLED,o.mediaSettings=Be(null==(t=e.participant)?void 0:t.mediaSettings),o.participantState=Xe.mapParticipantState(e.participant),o.roles=(null==(n=e.participant)?void 0:n.roles)||[],this._setParticipantsStatus([o],Ft.WAITING),"ACTIVE"===this._state&&this._transport&&this._transport.allocate(o.id,!0),this._changeRemoteMediaSettings(r,o.mediaSettings),this._changeRemoteParticipantState(r,o.participantState),this._invokeRolesChangedCallbackIfNeeded(o))}))}_onJoinedParticipant(e){return y(this,null,(function*(){var t,n;Yt.debug(`Participant joined [${e.participantId}]`);let r=Xe.composeMessageId(e),o=this._participants[r];o&&o.state===Y.ACCEPTED?Yt.warn(`Participant [${r}] is already in conversation and is active`):(o||(this._participants[r]=yield this._createParticipant({id:r,externalId:e.participant.externalId&&qt.fromSignaling(e.participant.externalId,e.participant.deviceIdx||0),mediaSettings:Be(e.participant.mediaSettings),state:e.participant.state,participantState:Xe.mapParticipantState(e.participant),roles:e.participant.roles||[],muteStates:e.participant.muteStates||{},unmuteOptions:e.participant.unmuteOptions||[]}),o=this._participants[r]),this._conversation&&this._conversation.direction===T.OUTGOING&&("IDLE"===this._state||"PROCESSING"===this._state)&&(this._state="ACTIVE",this._changeFeatureSet()),o.state=Y.ACCEPTED,o.mediaSettings=Be(e.mediaSettings),o.participantState=Xe.mapParticipantState(e.participant),o.roles=e.participant.roles||[],(null==(t=this._transport)?void 0:t.isAllocated(o.id))?this._setParticipantsStatus([o],Ft.CONNECTED):this._setParticipantsStatus([o],Ft.WAITING),"ACTIVE"===this._state&&this._transport&&(this._transport.isAllocated(o.id)||this._transport.allocate(o.id,!0),this._transport.open([o.id],null,!!(null==(n=this._conversation)?void 0:n.observer))),this._changeRemoteMediaSettings(r,o.mediaSettings),this._changeRemoteParticipantState(r,o.participantState),this._invokeRolesChangedCallbackIfNeeded(o))}))}_onClosedConversation(e){this._toggleJoinAvailability(),this._close(new Ve(e.reason,{remote:!0}))}_onMediaSettingsChanged(e){let t=Xe.composeMessageId(e);this._changeRemoteMediaSettings(t,Be(e.mediaSettings))}_onParticipantStateChanged(e){let t=Xe.composeMessageId(e);this._changeRemoteParticipantState(t,Xe.mapParticipantState(e))}_onNeedRate(){this._conversation&&(this._conversation.needRate=!0,this._changeNeedRate())}_onFeatureSetChanged(e){this._conversation&&(this._conversation.features=e.features,this._changeFeatureSet())}_onMultipartyChatCreated(e){this._conversation&&(this._conversation.chatId=e.chatId,this._toggleJoinAvailability(),Kt.onMultipartyChatCreated(this._conversation))}_onForceMediaSettingsChange(e){return y(this,null,(function*(){if(!this._mediaSource)return;let t=this._mediaSource.getMediaSettings(),n=Be(e.mediaSettings);t.isAudioEnabled!==n.isAudioEnabled&&(yield this._mediaSource.toggleAudio(n.isAudioEnabled)),t.isVideoEnabled!==n.isVideoEnabled&&(yield this._mediaSource.toggleVideo(n.isVideoEnabled)),Nt.consumerScreenTrack&&t.isScreenSharingEnabled!==n.isScreenSharingEnabled&&(yield this._mediaSource.toggleScreenCapturing(n.isScreenSharingEnabled))}))}_onSettingsUpdate(e){let t={camera:e.camera,screenSharing:e.screenSharing};this._serverSettings=nn(this._serverSettings,t),this._transport&&this._transport.updateSettings(this._serverSettings)}_onVideoQualityUpdate(e){let t=Math.round(e.quality.maxBitrate/1024),n=e.quality.maxDimension,r={camera:Object.assign({},this._serverSettings.camera,{maxBitrateK:t,maxDimension:n}),screenSharing:null};this._serverSettings=nn(this._serverSettings,r),Yt.log("Got video quality update notification",this._serverSettings),this._transport&&this._transport.updateSettings(this._serverSettings)}_onPeerRegistered(e){let t=Xe.composeMessageId(e);this._participants[t]&&(this._participants[t].clientType=e.clientType,this._participants[t].platform=e.platform)}_onMicSwitched(e){return y(this,null,(function*(){Kt.onDeviceSwitched(K.AUDIO,!e.mute),yield this.toggleLocalAudio(!e.mute)}))}_onChatMessage(e){return y(this,null,(function*(){let t,n=Xe.composeMessageId(e);t=this._participants[n]?this._participants[n].externalId:yield this._getParticipantId(n),Kt.onChatMessage(e.message,t,e.direct)}))}_onCustomData(e){return y(this,null,(function*(){if(e.data.hasOwnProperty("sdk"))return;let t,n=Xe.composeMessageId(e);t=this._participants[n]?this._participants[n].externalId:yield this._getParticipantId(n),Kt.onCustomData(e.data,t,e.direct)}))}_onRecordInfo(e){return y(this,null,(function*(){if(!this._conversation)return;let t=!1;if(!this._conversation.recordInfo!=!e?t=!0:this._conversation.recordInfo&&e&&(t=this._conversation.recordInfo.recordMovieId!==e.recordMovieId),t)if(e){let t=yield this._getParticipantId(e.initiator);Kt.onRecordStarted(t,e.recordMovieId,e.recordStartTime,e.recordType,e.recordExternalMovieId,e.recordExternalOwnerId)}else Kt.onRecordStopped();this._conversation.recordInfo=e}))}_onRolesChanged(e,t){if(this._conversation&&e===this._conversation.compositeUserId&&!le(this._conversation.roles,t))return Yt.debug(`Local roles changed: ${t}`),this._conversation.roles=t,Kt.onLocalRolesChanged(t),void this._processMuteState(Object.keys(this._conversation.muteStates));let n=this._participants[e];n&&!le(n.roles,t)&&(Yt.debug(`Roles for participant [${e}] changed: ${t}`),n.roles=t,Kt.onRolesChanged(n.externalId,t))}_onMuteParticipant(e,t=null){return y(this,null,(function*(){if(!this._conversation)return;let n=e.muteStates||{},r=e.unmuteOptions||[],o=e.mediaOptions||[],i=e.adminId?this._participants[e.adminId]:null;if(e.participantId&&e.participantId!==this._conversation.compositeUserId){if(!this._isCallAdmin())return void Yt.warn(`Not admin got mute states for participant [${e.participantId}]`);let t=this._participants[e.participantId];t&&(Yt.debug(`Mute states for participant [${e.participantId}] changed`,n),Kt.onMuteStates(n,r,o,e.muteAll,e.unmute,t.externalId,null==i?void 0:i.externalId))}else Xe.isObjectsEquals(this._conversation.muteStates,n)&&Xe.isArraysEquals(this._conversation.unmuteOptions,r)&&!o.length||(this._conversation.muteStates=n,this._conversation.unmuteOptions=r,e.adminId!==this._conversation.compositeUserId&&(yield this._processMuteState(o,e.muteAll,e.unmute,t,i)))}))}_processMuteState(){return y(this,arguments,(function*(e=[],t=!1,n=!1,r=null,o=null){if(!this._conversation||!this._mediaSource||this._participantState!==Y.ACCEPTED)return;let i=Object.assign({},this._conversation.muteStates),a=this._conversation.unmuteOptions,s=this._mediaSource.getMediaSettings(),c=Object.entries(i);for(let[t,o]of c)if((o===G.MUTE||o===G.MUTE_PERMANENT)&&(this._isCallAdmin()&&o===G.MUTE_PERMANENT&&(i[t]=G.MUTE),e.includes(t)&&!n))switch(t){case K.VIDEO:s.isVideoEnabled&&!(null==r?void 0:r.isVideoEnabled)&&(Kt.onDeviceSwitched(K.VIDEO,!1),yield this.toggleLocalVideo(!1));break;case K.AUDIO:s.isAudioEnabled&&!(null==r?void 0:r.isAudioEnabled)&&(Kt.onDeviceSwitched(K.AUDIO,!1),yield this.toggleLocalAudio(!1));break;case K.SCREEN_SHARING:s.isScreenSharingEnabled&&!(null==r?void 0:r.isScreenSharingEnabled)&&(Kt.onDeviceSwitched(K.SCREEN_SHARING,!1),yield this.toggleScreenCapturing(!1))}Kt.onMuteStates(i,a,e,t,n,null,null==o?void 0:o.externalId)}))}_onPinParticipant(e,t=!1){if(!this._conversation)return;let n=this._conversation.pinnedParticipantId;n&&n!==e&&(this._participants[n]?Kt.onPinnedParticipant(this._participants[n].externalId,!0):this._conversation.compositeUserId===n&&Kt.onLocalPin(!0)),this._participants[e]?Kt.onPinnedParticipant(this._participants[e].externalId,t):this._conversation.compositeUserId===e&&Kt.onLocalPin(t),this._conversation.pinnedParticipantId=t?null:e}_onOptionsChanged(e){this._conversation&&!function(e,t){if(e.length!==t.length)return!1;for(let n of e)if(!t.includes(n))return!1;return!0}(this._conversation.options,e)&&(this._conversation.options=e,Kt.onOptionsChanged(e))}_onNetworkStatus(e){if(this._conversation){let t=[];for(let[n,r]of Object.entries(e)){let e;if(n===this._conversation.compositeUserId||""===n)e=this._conversation.networkRating;else{if(!this._participants[n])continue;e=this._participants[n].networkRating}if(e!==r)if(n===this._conversation.compositeUserId||""===n)this._conversation.networkRating=r,Kt.onLocalNetworkStatusChanged(r);else{let e=this._participants[n];e.networkRating=r,t.push({uid:e.externalId,rating:r})}}if(0===t.length)return;Yt.log("Received network status update: ",e),Kt.onNetworkStatusChanged(t)}}_onRemoteStreamSecond(e,t){let n=this._participants[e];if(n){if(Nt.producerScreenTrack)return void Kt.onRemoteScreenStream(n.externalId,t);if(n.secondStream=t,Nt.videoTracksCount>0){let t=e;if(!this._streamIdByStreamDescription.has(t))return void Yt.error("Received remote stream notification for a participant that has no track associated with it",t);let r=this._streamIdByStreamDescription.get(t);if(!r||this._streamWaitTimerByStreamDescription.has(t))return void Yt.log("Delaying secondary stream start/stop until main stream becomes available",t);let o=this._streamByStreamId.get(r);if(!o)return Oe.log(ne.PAT_ERROR,"streamNotFound"),void Yt.error(`Could not find stream by ID: ${r}`);Kt.onRemoteStream(n.externalId,n.secondStream||o)}else{let e=t||n.remoteStream;e&&Kt.onRemoteStream(n.externalId,e)}}}_onPeerConnectionClosed(e){e===kn.SERVER&&this._cleanupParticipantAgnosticStreams()}_changeFeatureSet(){if(this._conversation){let e="ACTIVE"===this._state,t=this._conversation.features.includes(k.ADD_PARTICIPANT);Kt.onCallState(e,t,this._conversation)}}_changeNeedRate(){this._conversation&&this._conversation.needRate&&Kt.onRateNeeded()}_onVolumesDetected(e){let t=[];for(let[n,r]of Object.entries(e)){let e=this._participants[n];e&&e.externalId&&t.push({uid:e.externalId,volume:r.real})}Kt.onVolumesDetected(t)}_onSpeakerChanged(e){this._activeSpeakerId=e,this._participants[e]&&this._lastSignalledActiveSpeakerId!==e&&(Kt.onSpeakerChanged(this._participants[e].externalId),this._lastSignalledActiveSpeakerId=e)}_onTransportStateChanged(e,t){return y(this,null,(function*(){let n;if(Yt.debug(`Transport state has changed: ${t}`,e),t===In.CONNECTED?n=Ft.CONNECTED:t===In.CONNECTING||t===In.OPENED?n=Ft.CONNECTING:t===In.RECONNECTING&&(n=Ft.RECONNECT),!n)return;let r=e.reduce(((e,n)=>{if(n in this._participants){let r=this._participants[n];e.push(r),t===In.CONNECTED&&(r.remoteStream||(r.mediaSettings&&this._changeRemoteMediaSettings(n,r.mediaSettings),this._changeRemoteParticipantState(n,r.participantState)),this._updateDisplayLayoutFromCache(n))}else Yt.warn(`Participant [${n}] isn't in conversation`);return e}),[]);!r.length||this._setParticipantsStatus(r,n)}))}_onTransportLocalStateChanged(e){return y(this,null,(function*(){Yt.debug(`Local transport state has changed: ${e}`),e===In.CONNECTED&&Kt.onLocalStatus(Ft.CONNECTED),e===In.CONNECTING&&Kt.onLocalStatus(Ft.CONNECTING),e===In.RECONNECTING&&Kt.onLocalStatus(Ft.RECONNECT),e===In.FAILED&&this._transport&&0===this._transport.allocated().length&&(this._signaling.ready&&(yield this._signaling.hangup(H.FAILED)),this._close(new Ve(H.FAILED),"Transport failed"))}))}_onRemoteTrackAdded(e,t,n){return y(this,null,(function*(){if(e.endsWith(oe.AUDIO_MIX))Yt.debug("Remote audio mix track added"),this._audioOutput.add(n);else if(e.startsWith(oe.PARTICIPANT_AGNOSTIC_TRACK_PREFIX))Yt.debug(`Participant-agnostic track added: ${e}`),this._streamByStreamId.set(e,t);else{Yt.debug(`Remote track added on the participant [${e}]`,{kind:n.kind});let r=this._participants[e];if(r||(Yt.warn(`Conversation: track added before participant [${e}]`),this._participants[e]=yield this._createParticipant({id:e}),r=this._participants[e],this._setParticipantsStatus([r],Ft.WAITING),this._activeSpeakerId===e&&this._lastSignalledActiveSpeakerId!==e&&(Kt.onSpeakerChanged(r.externalId),this._lastSignalledActiveSpeakerId=e)),this._transport&&!this._transport.isAllocated(r.id)&&this._transport.allocate(r.id,!1),n.kind===je.audio&&this._audioOutput.add(n),r.remoteStream!==t){if(r.remoteStream=t,r.secondStream)return;Kt.onRemoteStream(r.externalId,t)}r.mediaSettings&&this._changeRemoteMediaSettings(e,r.mediaSettings),Nt.batchParticipantsOnStart||this._changeRemoteParticipantState(e,r.participantState)}}))}_onRemoteTrackRemoved(e,t,n){switch(Yt.debug(`[${e}] remote track (removed)`,{track:n}),n.kind){case je.audio:this._removeAudioTrack(e,t,n);break;case je.video:case je.screen:this._removeVideoTrack(e,t,n)}}_removeAudioTrack(e,t,n){if(e!==oe.AUDIO_MIX){let n=this._participants[e];if(!n||n.remoteStream&&n.remoteStream!==t)return}this._audioOutput.remove(n)}_removeVideoTrack(e,t,n){}_onRemoteActivityNoSignal(){this._onRemoteSignalledStall([]),this._onRemoteAllStall(!1)}_onTopologyChanged(e){this._conversation&&(this._conversation.topology=e,this._changeFeatureSet())}_onRemoteAllStall(e){if(this._remoteAllStalled===e)return;this._remoteAllStalled=e;let t=[],n=[];for(let r in this._participants)if(this._participants.hasOwnProperty(r)){let o=this._participants[r];e||this._lastStalled[r]?t.push(o):n.push(o)}t.length&&this._setParticipantsStatus(t,Ft.RECONNECT),n.length&&this._setParticipantsStatus(n,Ft.CONNECTED)}_onRemoteSignalledStall(e){let t={},n=[],r=[];e.forEach((e=>{if(t[e]=!0,!this._lastStalled[e]){let t=this._participants[e];t&&!this._remoteAllStalled&&n.push(t)}delete this._lastStalled[e]})),Object.keys(this._lastStalled).forEach((e=>{let t=this._participants[e];t&&!this._remoteAllStalled&&r.push(t)})),n.length&&this._setParticipantsStatus(n,Ft.RECONNECT),r.length&&this._setParticipantsStatus(r,Ft.CONNECTED),this._lastStalled=t}_onRemoteDataStats(e){this._debugInfo&&this._debugInfo.onRemoteDataStats(e,this._participants),this._fixAudioDevice(e.outbound.rtps)}_fixAudioDevice(e){var t;!Ct.hasMicrophone()||!this._audioFix||!(null==(t=this._mediaSource)?void 0:t.getMediaSettings().isAudioEnabled)||this._audioFix.fix(e)}_toggleJoinAvailability(){let e=this._conversation&&this._conversation.chatId,t=e&&"CLOSE"!==this._state||!1;e&&(Yt.debug("Toggle join availability",{available:t,chatId:e}),Kt.onJoinStatus(t,e))}_updateDisplayLayoutFromCache(e){return y(this,null,(function*(){var t;if((null==(t=this._transport)?void 0:t.getTopology())!==kn.SERVER)return;let n=this._participants[e];n&&n.lastRequestedLayouts&&Object.keys(n.lastRequestedLayouts).length&&(yield this.updateDisplayLayout(Object.values(n.lastRequestedLayouts)))}))}_setParticipantsStatus(e,t,n=null){if(!e.length)return;let r=e.reduce(((e,r)=>(r.status!==t&&(r.status=t,Nt.batchParticipantsOnStart?e.push(r.externalId):Kt.onParticipantStatus(r.externalId,t,n)),e)),[]);!r.length||Nt.batchParticipantsOnStart&&Kt.onRemoteStatus(r,t,n)}},Fn=Un;Fn._delayedHangup=!1;var Wn,Vn=class extends Error{constructor(e,t){super(e),Object.setPrototypeOf(this,Vn.prototype),this.participantErrors=t}};function Hn(){return y(this,null,(function*(){var e;if("AUTO"!==Nt.apiEnv)return Nt.apiEndpoint;try{let t=atob("aHR0cHM6Ly9kbnMuZ29vZ2xlL3Jlc29sdmU/bmFtZT12aWRlby5fZW5kcG9pbnQub2sucnUmdHlwZT1UWFQ="),n=yield(yield fetch(t,{method:"GET",mode:"cors",cache:"no-cache"})).json(),r=null==(e=null==n?void 0:n.Answer[0])?void 0:e.data;if(!r)throw new Error("Wrong DNS response");return Yt.debug("Resolved API endpoint",r),r}catch(e){return Yt.warn("Failed to resolve API endpoint using DNS, default is used",e),Nt.apiEndpoint}}))}function jn(e,t={},n=!1){if(!window.Blob||!window.navigator.sendBeacon)return;let r=zn(e,t,n),o=new window.Blob([r],{type:"application/x-www-form-urlencoded"});window.navigator.sendBeacon(`${Wn}/fb.do`,o)}function Kn(e){return y(this,null,(function*(){return new Promise(((t,n)=>{let r=new XMLHttpRequest;r.open("POST",`${Wn}/fb.do`,!0),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.onreadystatechange=()=>{if(r.readyState!==XMLHttpRequest.DONE)return;let e;try{e=JSON.parse(r.responseText)}catch(t){e={result:r.responseText}}200!==r.status||e.hasOwnProperty("error_msg")?n(e):t(e)},r.send(e)}))}))}function zn(e,t={},n=!1){t.method=e,t.format="JSON",t.application_key||(t.application_key=Nt.apiKey),n||(Lt.sessionKey?t.session_key=Lt.sessionKey:Lt.accessToken&&(t.access_token=Lt.accessToken));for(let[e,n]of Object.entries(t))"object"==typeof n&&(t[e]=JSON.stringify(n));let r="";for(let[e,n]of Object.entries(t))r&&(r+="&"),r+=`${e}=${encodeURIComponent(n)}`;return r}var Gn,qn=class extends E{constructor(){super(...arguments),this._userId=null,this._externalUidsCache={}}_callUnsafe(e){return y(this,arguments,(function*(e,t={},n=!1){let r=o=>y(this,null,(function*(){try{return yield function(e){return y(this,arguments,(function*(e,t={},n=!1){return Wn||(Wn=yield Hn()),Kn(zn(e,t,n))}))}(e,t,n)}catch(t){if(!t.hasOwnProperty("error_msg")&&(o++,Yt.debug(`${e} network error, attempt ${o}...`),o<10))return yield Xe.delay(Math.min(700*o,3e3)),r(o);throw Yt.warn(e,"error",t),t}}));return r(0)}))}_call(e){return y(this,arguments,(function*(e,t={},n=!1){try{return yield this._callUnsafe(e,t,n)}catch(r){Yt.warn("Api call error",r);let o=W.API;switch(r.error_code){case 102:case 103:case 104:return yield this.authorize(),this._callUnsafe(e,t,n);case 1101:o=H.SERVICE_DISABLED;break;case 1102:o=H.CALLEE_IS_OFFLINE;break;case 1103:o=H.NOT_FRIENDS;break;case 1104:case 1106:o=H.EXTERNAL_API_ERROR}throw new Ve(o,{message:r.error_msg,code:r.error_code})}}))}userId(e){return y(this,null,(function*(){let t=Xe.decomposeId(e).id;return Lt.isEmpty()?Gt.fromId(String(t)):(this._externalUidsCache.hasOwnProperty(t)||Object.assign(this._externalUidsCache,yield this._getExternalIdsByOkIds([t])),Gt.fromString(this._externalUidsCache[t]))}))}prepareUserIds(e){return y(this,null,(function*(){Lt.isEmpty()||Object.assign(this._externalUidsCache,yield this._getExternalIdsByOkIds(e))}))}authorize(){return y(this,null,(function*(){if(!this._uuid){let e=xe.get("uuid");e||(e=Xe.uuid(),xe.set("uuid",e)),this._uuid=String(e)}let e={session_data:{version:2,device_id:this._uuid,client_version:Nt.appVersion,client_type:"SDK_JS"}};return Nt.authToken&&(e.session_data.auth_token=Nt.authToken,e.session_data.version=3),this._callUnsafe("auth.anonymLogin",e,!0).then((e=>{e.uid&&(this._userId=Number(e.uid)),Lt.sessionKey=e.session_key,Lt.sessionSecretKey=e.session_secret_key})).catch((e=>{throw 401===e.error_code&&Kt.onTokenExpired(),new Ve(W.AUTH,{message:e.error_msg,code:e.error_code})}))}))}log(e){jn("log.externalLog",{collector:"ok.mobile.apps.video",data:JSON.stringify({application:`${Nt.appName}:${Nt.sdkVersion}`,platform:Nt.platform,items:e})})}init(){!function(){if(!Nt.apiKey)throw new Ve(W.API,{message:"Required argument apiAppKey not passed"})}()}joinConversation(e,t=!1,n){return y(this,null,(function*(){let r={conversationId:e,isVideo:t,protocolVersion:Nt.protocolVersion};return n&&(r.chatId=n),this._call("vchat.joinConversation",r)}))}createConversation(e,t="",n=!1){return y(this,null,(function*(){let r={conversationId:e,createJoinLink:!0,isVideo:!1};return t&&(r.payload=t),Nt.domain&&(r.domainId=Nt.domain),n&&(r.requireAuthToJoin=!0),this._startConversation(r)}))}startConversation(e,t,n,r=!1,o="",i=!1,a=!1){return y(this,null,(function*(){let s={conversationId:e,isVideo:r};if(t&&t.length)switch(n){case D.USER:s.uids=t.join(",");break;case D.GROUP:s.gid=t[0];break;case D.CHAT:s.chatId=t[0]}return i&&(s.createJoinLink=!0),o&&(s.payload=o),Nt.domain&&(s.domainId=Nt.domain),a&&(s.requireAuthToJoin=!0),this._startConversation(s)}))}_startConversation(e){return y(this,null,(function*(){return this._call("vchat.startConversation",e)}))}createJoinLink(e){return y(this,null,(function*(){return this._call("vchat.createJoinLink",{conversationId:e})}))}removeJoinLink(e){return y(this,null,(function*(){return this._call("vchat.removeJoinLink",{conversationId:e})}))}getAnonymTokenByLink(e,t){return y(this,null,(function*(){let n={joinLink:e};t&&(n.anonymName=t);let r=yield this._call("vchat.getAnonymTokenByLink",n);return this._userId=Number(r.uid),r.token}))}joinConversationByLink(e,t=!1,n){return y(this,null,(function*(){let r={joinLink:e,isVideo:t,protocolVersion:Nt.protocolVersion};return(null==n?void 0:n.length)&&(r.observedIds=n.join(",")),Nt.anonymToken&&(r.anonymToken=Nt.anonymToken),this._call("vchat.joinConversationByLink",r)}))}getOkIdsByExternalIds(e){return y(this,null,(function*(){let t=Gt.fromIds(e),n=[],r={methods:[]},o=[],i=Object.keys(this._externalUidsCache),a=Object.values(this._externalUidsCache);for(let e of t){let t=Gt.toString(e),s=a.indexOf(t);s>-1?n.push(Number(i[s])):(o.push(t),r.methods.push({"vchat.getOkIdByExternalId":{params:{externalId:e.id,anonym:e.type===$t.ANONYM},onError:"SKIP"}}))}return r.methods.length&&(yield this._call("batch.executeV2",r)).forEach(((e,t)=>{if(e.ok){let r=Number(e.ok.ok_id);this._externalUidsCache[r]=o[t],n.push(r)}})),n}))}getExternalIdsByOkIds(e){return y(this,null,(function*(){let t=[],n=[];for(let r of e)this._externalUidsCache.hasOwnProperty(r)?t.push(Gt.fromString(this._externalUidsCache[r])):n.push(r);if(!n.length)return t;let r=yield this._getExternalIdsByOkIds(n);Object.assign(this._externalUidsCache,r);for(let e of n)r.hasOwnProperty(e)&&t.push(Gt.fromString(r[e]));return t}))}getCachedOkIdByExternalId(e){let t=Object.keys(this._externalUidsCache),n=Object.values(this._externalUidsCache),r=Gt.toString(e),o=n.indexOf(r);return o>-1?Xe.composeUserId(t[o],de.USER):null}cacheExternalId(e,t){let n=Xe.decomposeId(e).id;this._externalUidsCache[n]=Gt.toString(t)}getConversationParams(e){return y(this,null,(function*(){let t={};return Nt.anonymToken&&(t.anonymToken=Nt.anonymToken),e&&(t.conversationId=e),this._call("vchat.getConversationParams",t)}))}getUserId(){return this._userId}setUserId(e){this._userId=e}hangupConversation(e){let t={conversationId:e,reason:H.HUNGUP};Nt.anonymToken&&(t.anonymToken=Nt.anonymToken),jn("vchat.hangupConversation",t)}removeHistoryRecords(e){return y(this,null,(function*(){yield this._call("vchat.removeHistoryRecords",{recordIds:e.join(",")})}))}cleanup(){}_getExternalIdsByOkIds(e){return y(this,null,(function*(){let t={};try{let n=yield this._call("vchat.getExternalIdsByOkIds",{uids:e.join(",")});if(n.external_ids)for(let[e,r]of Object.entries(n.external_ids))t[e]=Gt.fromIdToString(r,$t.USER);if(n.anonym_ids)for(let[e,r]of Object.entries(n.anonym_ids))t[e]=Gt.fromIdToString(r,$t.ANONYM);return t}catch(e){return t}}))}},Yn=((Gn=Yn||{}).RECOVER="recover",Gn.ACCEPT_CALL="accept-call",Gn.ADD_PARTICIPANT="add-participant",Gn.REMOVE_PARTICIPANT="remove-participant",Gn.HANGUP="hangup",Gn.TRANSMIT_DATA="transmit-data",Gn.ACCEPT_PRODUCER="accept-producer",Gn.ALLOCATE_CONSUMER="allocate-consumer",Gn.CHANGE_MEDIA_SETTINGS="change-media-settings",Gn.CHANGE_PARTICIPANT_STATE="change-participant-state",Gn.CHANGE_STREAM_PRIORITIES="change-streams-priorities",Gn.UPDATE_DISPLAY_LAYOUT="update-display-layout",Gn.REPORT_PERF_STAT="report-perf-stat",Gn.RECORD_START="record-start",Gn.RECORD_STOP="record-stop",Gn.RECORD_SET_ROLE="record-set-role",Gn.RECORD_GET_STATUS="record-get-status",Gn.SWITCH_MICRO="switch-micro",Gn.SWITCH_TOPOLOGY="switch-topology",Gn.REQUEST_REALLOC="request-realloc",Gn.CHAT_MESSAGE="chat-message",Gn.CHAT_HISTORY="chat-history",Gn.CUSTOM_DATA="custom-data",Gn.GRANT_ROLES="grant-roles",Gn.MUTE_PARTICIPANT="mute-participant",Gn.PIN_PARTICIPANT="pin-participant",Gn.UPDATE_MEDIA_MODIFIERS="update-media-modifiers",Gn.CHANGE_OPTIONS="change-options",Gn.GET_WAITING_HALL="get-waiting-hall",Gn.PROMOTE_PARTICIPANT="promote-participant",Gn.REQUEST_TEST_MODE="request-test-mode",Gn.ADD_MOVIE="add-movie",Gn.UPDATE_MOVIE="update-movie",Gn.REMOVE_MOVIE="remove-movie",Gn),$n=Yn,Xn="open",Qn=[()=>Nt.producerScreenTrack,()=>Nt.videoTracksCount>0,()=>!0,()=>Nt.filteredMessages,()=>Nt.consumerScreenTrack,()=>!0,()=>Nt.movieShare],Jn=class extends C{constructor(){super(...arguments),this.socket=null,this.sequence=1,this.lastStamp=0,this.websocketCommandsQueue=[],this.datachannelCommandsQueue=[],this.incomingCache=[],this.responseHandlers={},this.reconnectCount=0,this.conversationResolve=null,this.conversationReject=null,this.connected=!1,this.listenersReady=!1,this.postfix="&platform="+Nt.platform+"&appVersion="+Nt.appVersion+"&version="+Nt.protocolVersion+"&device="+Nt.device+"&capabilities="+Jn._getCapabilityFlags(),this.peerId=null,this.conversationId=null,this.reconnectTimer=0,this.connectionMessageWaitTimer=0,this.doctorTimer=0,this.participantIdRegistry=null,this.producerNotificationDataChannel=null,this.producerCommandDataChannel=null}static _getCapabilityFlags(){let e=0;for(let t=0;t<Qn.length;t++)Qn[t]()&&(e|=1<<t);return e.toString(16).toUpperCase()}get ready(){return null!==this.socket}setEndpoint(e){this.endpoint=e}setConversationId(e){this.conversationId=e}setParticipantIdRegistry(e){this.participantIdRegistry=e}setProducerNotificationDataChannel(e){this.producerNotificationDataChannel=e,this.producerNotificationDataChannel.onmessage=e=>{var t;let n=null==(t=this.participantIdRegistry)?void 0:t.handleMessage(e.data);n&&this._handleMessage(n)}}setProducerCommandDataChannel(e){this.producerCommandDataChannel=e,this.producerCommandDataChannel.onmessage=this._onMessage.bind(this),this._handleCommandsQueue(this.datachannelCommandsQueue)}cleanup(){this.datachannelCommandsQueue=[]}connect(e){return y(this,null,(function*(){return this.postfix+=`&clientType=${Nt.clientType}`,new Promise(((t,n)=>{if(this.socket&&this.socket.readyState<WebSocket.CLOSING)return Oe.log(ne.SOCKET_ACTION,"already_opened"),void n(Error("Socket already opened"));this.conversationResolve=e=>{t(e),this.conversationResolve=null,this.conversationReject=null},this.conversationReject=e=>{n(e),this.conversationResolve=null,this.conversationReject=null},this._connect(e)}))}))}_send(e){return y(this,arguments,(function*(e,t={},n=0){if(t.participantId){let e=Xe.decomposeParticipantId(t.participantId),n=Xe.decomposeId(e.compositeUserId);t=Object.assign({},t,{participantId:n.id,participantType:n.type}),e.deviceIdx&&(t.deviceIdx=e.deviceIdx)}return this._sendRaw(e,t,n)}))}_sendRaw(e){return y(this,arguments,(function*(e,t={},n=0){let r=t=>{var n;if(this._isDataChannelCommand(e))this.datachannelCommandsQueue.push(t),(null==(n=this.producerCommandDataChannel)?void 0:n.readyState)===Xn&&this._handleCommandsQueue(this.datachannelCommandsQueue);else{if(!this.socket)return Oe.log(ne.SOCKET_ACTION,"not_opened"),Yt.warn("Socket not opened"),void t.reject(new Error(`Socket not opened [${e}]`),!0);this.socket.readyState>WebSocket.OPEN&&(Oe.log(ne.SOCKET_ACTION,"invalid_state"),Yt.warn(`Socket is not opened, state ${this.socket.readyState}`)),this.websocketCommandsQueue.push(t),this.socket&&this.socket.readyState===WebSocket.OPEN&&this._handleCommandsQueue(this.websocketCommandsQueue)}};return new Promise(((o,i)=>{let a={sequence:this.sequence++,name:e,params:t,responseTimer:0,resolve:o,reject:(t,o=!1)=>{!n||o?i(t):(Yt.debug("Resending a signaling message",e,a.sequence),n--,r(a))}};r(a)}))}))}_isDataChannelCommand(e){return!!this.producerCommandDataChannel&&(e===$n.UPDATE_DISPLAY_LAYOUT||e===$n.REPORT_PERF_STAT)}static _isDataChannelResponseRequired(e){return e===$n.UPDATE_DISPLAY_LAYOUT||e===$n.REPORT_PERF_STAT}getNextCommandSequenceNumber(){return this.sequence}hangup(e){return y(this,null,(function*(){return this._send($n.HANGUP,{reason:e}).catch((()=>{}))}))}sendCandidate(e,t){return y(this,null,(function*(){return this._send($n.TRANSMIT_DATA,{participantId:e,data:{candidate:t}})}))}requestTestMode(e){return y(this,null,(function*(){return this._send($n.REQUEST_TEST_MODE,{consumerCommand:e})}))}sendSdp(e,t){return y(this,null,(function*(){return this._send($n.TRANSMIT_DATA,{participantId:e,data:{sdp:t}})}))}acceptCall(e){return y(this,null,(function*(){return this._send($n.ACCEPT_CALL,{mediaSettings:e})}))}changeMediaSettings(e){return y(this,null,(function*(){return this._send($n.CHANGE_MEDIA_SETTINGS,{mediaSettings:e},10)}))}changeParticipantState(e){return y(this,null,(function*(){return this._send($n.CHANGE_PARTICIPANT_STATE,{participantState:{state:e}})}))}addParticipant(e,t){return y(this,null,(function*(){return this._send($n.ADD_PARTICIPANT,((e,t)=>{for(var n in t||(t={}))f.call(t,n)&&g(e,n,t[n]);if(h)for(var n of h(t))m.call(t,n)&&g(e,n,t[n]);return e})({participantId:e},t))}))}removeParticipant(e,t=!1){return y(this,null,(function*(){return this._send($n.REMOVE_PARTICIPANT,{participantId:e,ban:t})}))}allocateConsumer(e,t){return y(this,null,(function*(){let n={capabilities:t};return e&&(n.description=e.sdp),this._send($n.ALLOCATE_CONSUMER,n)}))}acceptProducer(e,t){return y(this,null,(function*(){let n={description:e.sdp};return t&&(n.ssrcs=t),this._send($n.ACCEPT_PRODUCER,n)}))}changePriorities(e){return y(this,null,(function*(){return this._send($n.CHANGE_STREAM_PRIORITIES,{typedPriorities:e}).catch((()=>{}))}))}updateDisplayLayout(e){return y(this,null,(function*(){return this._send($n.UPDATE_DISPLAY_LAYOUT,{layouts:e})}))}addMovie(e){return y(this,null,(function*(){return this._send($n.ADD_MOVIE,e)}))}updateMovie(e){return y(this,null,(function*(){return this._send($n.UPDATE_MOVIE,e)}))}removeMovie(e){return y(this,null,(function*(){return this._send($n.REMOVE_MOVIE,e)}))}startStream(e){return y(this,null,(function*(){return this._send($n.RECORD_START,e)}))}stopStream(){return y(this,null,(function*(){return this._send($n.RECORD_STOP)}))}recordSetRole(e,t){return y(this,null,(function*(){return this._send($n.RECORD_SET_ROLE,{participantId:e,role:t})}))}getRecordStatus(){return y(this,null,(function*(){return this._send($n.RECORD_GET_STATUS)}))}switchTopology(e,t=!1){return y(this,null,(function*(){return this._send($n.SWITCH_TOPOLOGY,{topology:e,force:t})}))}requestRealloc(){return y(this,null,(function*(){return this._send($n.REQUEST_REALLOC)}))}reportPerfStat(e){return y(this,null,(function*(){return this._send($n.REPORT_PERF_STAT,{report:e})}))}chatMessage(e,t=null){return y(this,null,(function*(){return this._send($n.CHAT_MESSAGE,{message:e,participantId:t})}))}chatHistory(e){return y(this,null,(function*(){return this._send($n.CHAT_HISTORY,{count:e})}))}customData(e,t){return y(this,null,(function*(){return this._send($n.CUSTOM_DATA,{data:e,participantId:t})}))}grantRoles(e,t,n){return y(this,null,(function*(){let r={participantId:e,roles:t};return n&&(r.revoke=!0),this._sendRaw($n.GRANT_ROLES,r)}))}muteParticipant(e,t,n){return y(this,null,(function*(){return this._sendRaw($n.MUTE_PARTICIPANT,{participantId:e,muteStates:t,requestedMedia:n})}))}pinParticipant(e,t){return y(this,null,(function*(){let n={participantId:e};return t&&(n.unpin=!0),this._sendRaw($n.PIN_PARTICIPANT,n)}))}updateMediaModifiers(e){return y(this,null,(function*(){return this._send($n.UPDATE_MEDIA_MODIFIERS,{mediaModifiers:e})}))}changeOptions(e){return y(this,null,(function*(){return this._send($n.CHANGE_OPTIONS,{options:e})}))}getWaitingHall(e=null,t,n=!1){return y(this,null,(function*(){let r={};return e&&(r.fromId=e),t&&(r.count=t),n&&(r.backward=n),this._send($n.GET_WAITING_HALL,r)}))}promoteParticipant(e,t=!1){return y(this,null,(function*(){let n={participantId:e};return t&&(n.demote=t),this._sendRaw($n.PROMOTE_PARTICIPANT,n)}))}close(){this.socket&&this.socket.readyState<WebSocket.CLOSING&&this._closeSocket(),this._stopWaitConnectionMessage(),this._stopDoctor(),clearTimeout(this.reconnectTimer)}readyToSend(){this.listenersReady=!0,this._handleCachedMessages()}_connect(e){if(this.socket&&this.socket.readyState<WebSocket.CLOSING)return;let t="";e&&(t+=`&tgt=${e}`),e===X.RETRY&&this.lastStamp&&(t+=`&recoverTs=${this.lastStamp}`),Yt.debug("Connecting to "+this.endpoint+this.postfix+t),this.socket=new WebSocket(this.endpoint+this.postfix+t),this.socket.onopen=this._onOpen.bind(this),this.socket.onmessage=this._onMessage.bind(this),this.socket.onerror=this._onError.bind(this),this.socket.onclose=this._onClose.bind(this),this._startDoctor()}_disconnect(){this.socket&&this.socket.readyState<WebSocket.CLOSING&&(this.socket.onopen=null,this.socket.onmessage=null,this.socket.onerror=null,this.socket.onclose=null,this.socket.close(),this.socket=null),this._stopWaitConnectionMessage(),this._stopDoctor(),clearTimeout(this.reconnectTimer)}_onOpen(){Yt.debug("Socket opened"),Oe.log(ne.SOCKET_ACTION,"opened"),this._waitConnectionMessage(),this._startDoctor()}_onMessage(e){if(this._startDoctor(),"ping"!==e.data)try{this._handleMessage(JSON.parse(e.data))}catch(t){Oe.log(ne.SOCKET_ACTION,"parse_error"),Yt.error("Unable to parse message",t,e.data)}else this.socket&&this.socket.readyState===WebSocket.OPEN&&this.socket.send("pong")}_handleMessage(e){var t;"notification"===e.type?"connection"===e.notification?(Yt.debug("Signaling connected",e),this.connected=!0,this.reconnectCount=0,this.endpoint=e.endpoint,e.peerId&&this.peerId!==e.peerId.id&&(this.postfix+=`&peerId=${e.peerId.id}`,this.peerId=e.peerId.id),this._stopWaitConnectionMessage(),this.conversationResolve?this.conversationResolve(e):(this._triggerEvent(J.RECONNECT,e),e.conversation.topology&&this._triggerEvent(J.NOTIFICATION,{type:"notification",notification:ee.TOPOLOGY_CHANGED,topology:e.conversation.topology})),this.lastStamp&&this._handleCachedMessages(),null==(t=e.recoverMessages)||t.forEach((e=>this._handleMessage(e))),this._handleCommandsQueue(this.websocketCommandsQueue)):this.connected&&this.listenersReady?this._triggerEvent(J.NOTIFICATION,e):this.incomingCache.push(e):"response"===e.type&&this.responseHandlers[e.sequence]?this._handleCommandResponse(!0,e):"error"===e.type&&this.responseHandlers[e.sequence]?(Oe.log(ne.SOCKET_ACTION,`error-${e.error}`),this._handleCommandResponse(!1,e)):"error"===e.type?(Oe.log(ne.SOCKET_ACTION,`error-${e.error}`),"service-unavailable"===e.error?this._reconnect():"conversation-ended"===e.error?this.conversationReject?this.conversationReject(new Ve(H.SOCKET_CLOSED,{message:`Unable to connect to the signaling: ${e.error}`})):this._triggerEvent(J.NOTIFICATION,{notification:ee.CLOSED_CONVERSATION,reason:e.reason}):this.connected||"invalid-token"===e.error?this._throwError(new Error(`Signaling error: ${e.error}`)):e.sequence||(this.conversationReject&&this.conversationReject(new Ve(W.SIGNALING_FAILED,{message:`Unable to connect to the signaling: ${e.error}`})),this._closeSocket())):(Oe.log(ne.SOCKET_ACTION,"unknown_message"),Yt.warn("Unhandled message",e)),this.lastStamp=e.stamp||this.lastStamp}_handleCachedMessages(){let e=[...this.incomingCache];for(this.incomingCache=[];e.length>0;){let t=e.shift();this._handleMessage(t)}}_throwError(e){this._triggerEvent(J.FAILED,e)}_onError(e){Oe.log(ne.SOCKET_ACTION,"error"),Yt.error("Signaling error",e)}_onClose(e){Oe.log(ne.SOCKET_ACTION,"closed"),Yt.debug("Connection closed",{code:e.code,reason:e.reason}),this.connected=!1,this._stopDoctor(),this.socket&&this.reconnectCount++<Jn.RECONNECT_MAX_COUNT?this._reconnect():this.socket&&this._closeSocket(new Error("Connection closed"))}_closeSocket(e=null){!this.socket||(this._disconnect(),Object.values(this.responseHandlers).forEach((t=>{window.clearTimeout(t.responseTimer),e&&t.reject(new Error("Connection closed"),!0)})),this.websocketCommandsQueue=[],this.responseHandlers={},this.lastStamp=0,e&&this._throwError(new Error("Connection closed")))}_reconnect(){let e=Math.min(Jn.RECONNECT_MAX_DELAY,Jn.RECONNECT_DELAY*Math.pow(2,this.reconnectCount-1));Yt.log(`Reconnect websocket after ${e}ms (${this.reconnectCount})`),Oe.log(ne.SOCKET_ACTION,"reconnect"),this.reconnectTimer=window.setTimeout(this._connect.bind(this,X.RETRY),e)}_handleCommandResponse(e,t){var n;if(!this.responseHandlers.hasOwnProperty(t.sequence))return;let r=this.responseHandlers[t.sequence];window.clearTimeout(r.responseTimer),e?(delete this.responseHandlers[t.sequence],r.resolve(t)):(null==(n=this.socket)?void 0:n.readyState)===WebSocket.OPEN?(delete this.responseHandlers[t.sequence],Oe.log(ne.SOCKET_ACTION,"response-timeout"),r.reject(new Error(t.error||`Response timeout [${r.name}]`))):r.responseTimer=window.setTimeout((()=>this._handleCommandResponse(!1,t)),Jn.WAIT_RESPONSE_DELAY)}_handleCommandsQueue(e){for(var t,n;e.length>0;){let r=e.shift(),o=Object.assign({command:r.name,sequence:r.sequence},r.params);if(this._isDataChannelCommand(r.name)){if((null==(t=this.producerCommandDataChannel)?void 0:t.readyState)!==Xn)return void r.reject(new Error(`Invalid data channel state: ${null==(n=this.producerCommandDataChannel)?void 0:n.readyState}`));Jn._isDataChannelResponseRequired(r.name)&&(r.responseTimer=window.setTimeout((()=>this._handleCommandResponse(!1,o)),Jn.WAIT_RESPONSE_DELAY),this.responseHandlers[r.sequence]=r),this.producerCommandDataChannel.send(JSON.stringify(o))}else{if(!this.socket||this.socket.readyState!==WebSocket.OPEN){r.reject(new Error("Invalid state or socket already closed"));continue}r.responseTimer=window.setTimeout((()=>this._handleCommandResponse(!1,o)),Jn.WAIT_RESPONSE_DELAY),this.responseHandlers[r.sequence]=r,this.socket.send(JSON.stringify(o))}}}_waitConnectionMessage(){this.connectionMessageWaitTimer=window.setTimeout((()=>{this.conversationReject&&this.conversationReject(new Ve(W.SIGNALING_FAILED,{message:"Unable to connect to the signaling: connection timeout"}))}),Jn.WAIT_CONNECTION_DELAY)}_stopWaitConnectionMessage(){window.clearTimeout(this.connectionMessageWaitTimer),this.connectionMessageWaitTimer=0}_startDoctor(){this._stopDoctor(),this.doctorTimer=window.setTimeout((()=>{Yt.warn("Socket is dead, trying to reconnect"),this._disconnect(),this._connect(X.RETRY)}),Jn.WAIT_MESSAGE_DELAY)}_stopDoctor(){window.clearTimeout(this.doctorTimer),this.doctorTimer=0}},Zn=Jn;Zn.RECONNECT_DELAY=Nt.signalingReconnectDelay,Zn.RECONNECT_MAX_DELAY=Nt.signalingReconnectMaxDelay,Zn.RECONNECT_MAX_COUNT=Nt.signalingReconnectMaxCount,Zn.WAIT_CONNECTION_DELAY=Nt.waitConnectionDelay,Zn.WAIT_RESPONSE_DELAY=Nt.waitResponseDelay,Zn.WAIT_MESSAGE_DELAY=Nt.waitMessageDelay;var er,tr,nr=(e=>(e.KING="KING",e.PAWN="PAWN",e))(nr||{}),rr=nr,or=null,ir={getCameras:Ct.getCameras,getMicrophones:Ct.getMicrophones,getOutput:Ct.getOutput,hasCamera:Ct.hasCamera,hasMicrophone:Ct.hasMicrophone,getSavedCamera:Ct.getSavedCamera,getSavedMicrophone:Ct.getSavedMicrophone,getSavedOutput:Ct.getSavedOutput,hasCameraPermission:Ct.hasCameraPermission,hasMicrophonePermission:Ct.hasMicrophonePermission,hasPermissions:Ct.hasPermissions,getUserMedia:Ct.getUserMedia,getUserVideo:Ct.getUserVideo,getUserAudio:Ct.getUserAudio,saveDeviceId:Ct.saveDeviceId,isBrowserSupported:Ct.isBrowserSupported,isScreenCapturingSupported:Ct.isScreenCapturingSupported,os:Ct.os,isMobile:Ct.isMobile,browserName:Ct.browserName,browserVersion:Ct.browserVersion,baseChromeVersion:Ct.baseChromeVersion,getAudioContext:Ct.getAudioContext};function ar(e){tr=e}function sr(e){er=e}function cr(e){or=e}function lr(e){Nt.videoEffects=e}function ur(e){return y(this,null,(function*(){if(Nt.set(e),"Sferum"===Ct.browserName()&&(Nt.platform=`SFERUM:${Ct.browserVersion()}`),tr||ar(new qn),er||sr((()=>new Zn)),Nt.debug&&(i.default.disableLog(!1),Yt.toggle(!0)),Yt.log(`Calls SDK ${Nt.sdkVersion}`,e),yield Ct.init(),!Ct.isBrowserSupported())throw new Ve(W.UNSUPPORTED);tr.init()}))}function dr(e){return y(this,arguments,(function*(e,t=[K.AUDIO],n="",r=!1,o=!1){let i=[],a=[];if(Array.isArray(e)?i=e.length?e:[]:e&&(i=[e]),i.length&&(a=yield tr.getOkIdsByExternalIds(i),!a.length))throw new Ve(H.CALLEE_IS_OFFLINE);return _r(a,D.USER,t,n,r,o)}))}function _r(e){return y(this,arguments,(function*(e,t=D.USER,n,r="",o=!1,i=!1){if(Fn.current())throw Yt.error("There is already active call"),new Ve(H.FAILED);return new Fn(tr,er(),or).onStart(e,t,n,r,o,i)}))}function pr(e){return y(this,null,(function*(){return hr(e)}))}function hr(e){return y(this,arguments,(function*(e,t=de.USER,n){if(e===Fn.id())throw new Error("Push has already been processed");return new Fn(tr,er(),or).onPush(e,t,n)}))}function fr(e){return y(this,null,(function*(){return e&&(Nt.authToken=e),tr.authorize()}))}function mr(){return y(this,arguments,(function*(e=[K.AUDIO]){let t=Fn.current();if(t)return t.accept(e);throw new Error("Conversation not found")}))}function vr(){return y(this,null,(function*(){let e=Fn.current();if(e)return e.decline()}))}function gr(e){return y(this,arguments,(function*(e,t=[K.AUDIO]){return yr(e,t)}))}function yr(e,t,n){return y(this,null,(function*(){if(Fn.current())throw Yt.error("There is already active call"),new Ve(H.FAILED);return new Fn(tr,er(),or).onJoin({conversationId:e,mediaOptions:t,chatId:n})}))}function Er(e){return y(this,arguments,(function*(e,t=[K.AUDIO],n,r){if(Fn.current())throw Yt.error("There is already active call"),new Ve(H.FAILED);return n&&(Nt.anonymToken=n),new Fn(tr,er(),or).onJoin({joinLink:e,mediaOptions:t,observedIds:r})}))}function wr(){return y(this,null,(function*(){let e=Fn.current();if(e)return e.hangup();Fn.hangupAfterInit()}))}function br(e,t){return y(this,null,(function*(){let n=yield tr.getOkIdsByExternalIds([e]);if(!n.length)throw new Error("User not found");return Cr(n[0],t)}))}function Cr(e,t){return y(this,null,(function*(){let n=Fn.current();n&&(yield n.addParticipant(Xe.composeUserId(e,de.USER),t))}))}function Sr(e,t=!1){return y(this,null,(function*(){return Tr((yield tr.getOkIdsByExternalIds([e]))[0],t)}))}function Tr(e,t=!1){return y(this,null,(function*(){let n=Fn.current();n&&(yield n.removeParticipant(Xe.composeUserId(e,de.USER),t))}))}function Ar(e,t){return y(this,null,(function*(){let n=yield Ct.saveDeviceId(e,t),r=Fn.current();return n&&r?r.changeDevice(e):Promise.reject()}))}function Dr(e){return y(this,null,(function*(){let t=Fn.current();return t?t.toggleScreenCapturing(e):Promise.reject()}))}function Pr(e,t=!1){return y(this,null,(function*(){let n=Fn.current();n&&(yield n.setVideoStream(e,t))}))}function Or(e){return y(this,null,(function*(){let t=Fn.current();t&&(yield t.toggleLocalVideo(e))}))}function Ir(e){return y(this,null,(function*(){let t=Fn.current();t&&(yield t.toggleLocalAudio(e))}))}function kr(e,t,n){return y(this,null,(function*(){let r=Fn.current();if(r)return r.setLocalResolution(e,t,n)}))}function Rr(e){return y(this,null,(function*(){let t=Fn.current();t&&(yield t.changePriorities(e))}))}function Mr(e){return y(this,null,(function*(){let t=Fn.current();t&&(yield t.changeParticipantState(e))}))}function Lr(e){return y(this,null,(function*(){let t=Fn.current();t&&(yield t.updateDisplayLayout(e))}))}function xr(e,t,n=!1){return y(this,null,(function*(){return Nr((yield tr.getOkIdsByExternalIds([e]))[0],t,n)}))}function Nr(e,t,n=!1){return y(this,null,(function*(){let r=Fn.current();r&&(yield r.grantRoles(Xe.composeUserId(e,de.USER),t,n))}))}function Br(){return y(this,arguments,(function*(e=null,t,n=[]){let r=null;return e&&(r=(yield tr.getOkIdsByExternalIds([e]))[0]),Ur(r,t,n,qt.getDeviceIdx(e))}))}function Ur(){return y(this,arguments,(function*(e=null,t,n=[],r=0){let o=Fn.current();if(o){let i=e?Xe.composeParticipantId(e,de.USER,r):null;yield o.muteParticipant(i,t,n)}}))}function Fr(e,t=!1){return y(this,null,(function*(){return Wr((yield tr.getOkIdsByExternalIds([e]))[0],t,qt.getDeviceIdx(e))}))}function Wr(e,t=!1,n=0){return y(this,null,(function*(){let r=Fn.current();r&&(yield r.pinParticipant(Xe.composeParticipantId(e,de.USER,n),t))}))}function Vr(e){return y(this,null,(function*(){let t=Fn.current();t&&(yield t.updateMediaModifiers(e))}))}function Hr(e){return y(this,null,(function*(){let t=Fn.current();t&&(yield t.changeOptions(e))}))}function jr(e,t=null){return y(this,null,(function*(){let n=null;return t&&(n=(yield tr.getOkIdsByExternalIds([t]))[0]),Kr(e,n)}))}function Kr(e,t=null){return y(this,null,(function*(){let n=Fn.current();if(n){let r=t?Xe.composeUserId(t,de.USER):null;yield n.chatMessage(e,r)}}))}function zr(e=10){return y(this,null,(function*(){let t=Fn.current();if(t)return t.chatHistory(e)}))}function Gr(e,t=null){return y(this,null,(function*(){let n=null;return t&&(n=(yield tr.getOkIdsByExternalIds([t]))[0]),qr(e,n,qt.getDeviceIdx(t))}))}function qr(e,t=null,n=0){return y(this,null,(function*(){let r=Fn.current();if(r){let o=t?Xe.composeParticipantId(t,de.USER,n):null;yield r.customData(e,o)}}))}function Yr(e="",t=!1){return y(this,null,(function*(){return(yield tr.createConversation(Xe.uuid(),e,t)).join_link}))}function $r(){return y(this,null,(function*(){let e=Fn.current();return e?e.createJoinLink():Promise.reject()}))}function Xr(){return y(this,null,(function*(){let e=Fn.current();return e?e.removeJoinLink():Promise.reject()}))}function Qr(e,t){return y(this,null,(function*(){return tr.getAnonymTokenByLink(e,t)}))}function Jr(e){let t=Fn.current();t&&t.setVolume(e)}function Zr(e){Nt.forceRelayPolicy=e}function eo(e=!1,t=null,n=null,r="DIRECT_LINK",o=null){return y(this,null,(function*(){let i=Fn.current();return i?i.startStream(e,t,n,r,o):Promise.reject()}))}function to(){return y(this,null,(function*(){let e=Fn.current();return e?e.stopStream():Promise.reject()}))}function no(e,t){return y(this,null,(function*(){let n=Fn.current();if(n){let r=yield tr.getOkIdsByExternalIds([e]),o=qt.getDeviceIdx(e);return n.recordSetRole(Xe.composeParticipantId(r[0],de.USER,o),t)}return Promise.reject()}))}function ro(){return y(this,null,(function*(){let e=Fn.current();return e?e.getStreamInfo():Promise.reject()}))}function oo(e){return y(this,null,(function*(){let t=Fn.current();return t?t.addMovie(e):Promise.reject()}))}function io(e,t,n,r){return y(this,null,(function*(){let o=Fn.current();return o?o.updateMovie(e,t,n,r):Promise.reject()}))}function ao(e){return y(this,null,(function*(){let t=Fn.current();return t?t.removeMovie(e):Promise.reject()}))}function so(e){Nt.statisticsInterval=e;let t=Fn.current();if(t)return t.updateStatisticsInterval()}function co(e){i.default.disableLog(!e),Yt.toggle(e)}function lo(e,...t){!Nt.debugLog||Yt.send(e,"[external]",...t)}function uo(e){return y(this,null,(function*(){let t=Fn.current();if(t)return t.videoEffect(e)}))}function _o(e){return y(this,null,(function*(){let t=Fn.current();t&&(yield t.setAudioStream(e))}))}function po(e=null,t,n=!1){return y(this,null,(function*(){let r=Fn.current();if(!r)throw new Error("Conversation not found");return r.getWaitingHall(e,t,n)}))}function ho(e,t=!1){return y(this,null,(function*(){let n=Fn.current();if(!n)throw new Error("Conversation not found");let r=yield tr.getOkIdsByExternalIds([e]);return n.promoteParticipant(Xe.composeUserId(r[0],de.USER),t)}))}function fo(e){return y(this,null,(function*(){yield tr.removeHistoryRecords(e)}))}},394478:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 16 16",u="cancel_16",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="cancel_16"><g fill="none" fill-rule="evenodd"><path d="M0 0h16v16H0z" /><path d="M8 6.727l3.464-3.463a.9.9 0 111.272 1.272L9.273 8l3.463 3.464a.9.9 0 11-1.272 1.272L8 9.273l-3.464 3.463a.9.9 0 11-1.272-1.272L6.727 8 3.264 4.536a.9.9 0 011.272-1.272L8 6.727z" fill="currentColor" fill-rule="nonzero" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?16:+e.width,height:isNaN(e.height)?16:+e.height}))};p.mountIcon=_;const h=p},922995:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 16 16",u="clear_16",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="clear_16"><path d="M6.729 8.002L4.263 10.47a.9.9 0 101.273 1.273L8 9.275l2.465 2.468a.9.9 0 101.272-1.273L9.273 8.002l2.465-2.469a.9.9 0 10-1.272-1.273L8 6.728 5.536 4.26a.9.9 0 00-1.273 1.273l2.466 2.469zM8 16A8 8 0 118 0a8 8 0 010 16z" fill="currentColor" fill-rule="evenodd" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?16:+e.width,height:isNaN(e.height)?16:+e.height}))};p.mountIcon=_;const h=p},416259:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 16 16",u="done_16",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="done_16"><path d="M13.743 3.756a.872.872 0 010 1.237l-7.317 7.25a.88.88 0 01-1.242 0L2.257 9.366a.872.872 0 010-1.237.88.88 0 011.242 0l2.306 2.261L12.5 3.756a.88.88 0 011.242 0z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?16:+e.width,height:isNaN(e.height)?16:+e.height}))};p.mountIcon=_;const h=p},164357:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 16 12",u="dropdown_16",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 12" id="dropdown_16"><g fill="none" fill-rule="evenodd"><path d="M0 0h16v12H0z" /><path d="M4.454 3.691A.9.9 0 103.346 5.11l4.096 3.203a.9.9 0 001.109 0l4.1-3.203a.9.9 0 10-1.108-1.418L7.997 6.46l-3.543-2.77z" fill="currentColor" fill-rule="nonzero" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?16:+e.width,height:isNaN(e.height)?12:+e.height}))};p.mountIcon=_;const h=p},960837:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 16 16",u="search_outline_16",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="search_outline_16"><path d="M6.5 1a5.5 5.5 0 014.383 8.823l3.896 3.9a.75.75 0 01-1.061 1.06l-3.895-3.9A5.5 5.5 0 116.5 1zm0 1.5a4 4 0 100 8 4 4 0 000-8z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?16:+e.width,height:isNaN(e.height)?16:+e.height}))};p.mountIcon=_;const h=p},5420:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 16 16",u="spinner_16",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="spinner_16"><clipPath id="spinner_16_a"><path d="M0 0h16v16H0z" /></clipPath><g clip-path="url(#spinner_16_a)"><path clip-rule="evenodd" d="M11.215 2.934a6 6 0 00-8.644 7.62 1 1 0 11-1.81.852A8 8 0 118 16a1 1 0 110-2 6 6 0 003.215-11.066z" fill="currentColor" fill-rule="evenodd" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?16:+e.width,height:isNaN(e.height)?16:+e.height}))};p.mountIcon=_;const h=p},64107:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 20 20",u="cancel_20",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" id="cancel_20"><path clip-rule="evenodd" d="M4.72 4.72a.75.75 0 011.06 0L10 8.94l4.22-4.22a.75.75 0 111.06 1.06L11.06 10l4.22 4.22a.75.75 0 11-1.06 1.06L10 11.06l-4.22 4.22a.75.75 0 01-1.06-1.06L8.94 10 4.72 5.78a.75.75 0 010-1.06z" fill="currentColor" fill-rule="evenodd" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?20:+e.width,height:isNaN(e.height)?20:+e.height}))};p.mountIcon=_;const h=p},541800:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 20 20",u="check_box_off_20",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" id="check_box_off_20"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.046 2.534C4.788 2.138 5.517 2 7.128 2h5.744c1.61 0 2.34.138 3.082.534.65.348 1.164.862 1.512 1.512.396.742.534 1.471.534 3.082v5.744c0 1.61-.138 2.34-.534 3.082a3.644 3.644 0 01-1.512 1.512c-.742.396-1.472.534-3.082.534H7.128c-1.61 0-2.34-.138-3.082-.534a3.644 3.644 0 01-1.512-1.512C2.138 15.212 2 14.482 2 12.872V7.128c0-1.61.138-2.34.534-3.082a3.645 3.645 0 011.512-1.512zm3.082.966c-1.531 0-1.962.136-2.374.357a2.145 2.145 0 00-.897.897c-.22.412-.357.843-.357 2.374v5.744c0 1.531.136 1.962.357 2.374.208.389.508.69.897.897.412.22.843.357 2.374.357h5.744c1.531 0 1.962-.136 2.374-.357.389-.208.69-.508.897-.897.22-.412.357-.843.357-2.374V7.128c0-1.531-.136-1.962-.357-2.374a2.145 2.145 0 00-.897-.897c-.412-.22-.843-.357-2.374-.357H7.128z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?20:+e.width,height:isNaN(e.height)?20:+e.height}))};p.mountIcon=_;const h=p},418166:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 20 20",u="check_box_on_20",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" id="check_box_on_20"><path fill-rule="evenodd" clip-rule="evenodd" d="M2.436 4.184C2 5.04 2 6.16 2 8.4v3.2c0 2.24 0 3.36.436 4.216a4 4 0 001.748 1.748C5.04 18 6.16 18 8.4 18h3.2c2.24 0 3.36 0 4.216-.436a4 4 0 001.748-1.748C18 14.96 18 13.84 18 11.6V8.4c0-2.24 0-3.36-.436-4.216a4 4 0 00-1.748-1.748C14.96 2 13.84 2 11.6 2H8.4c-2.24 0-3.36 0-4.216.436a4 4 0 00-1.748 1.748zm12.2 3.803a.9.9 0 10-1.272-1.274l-4.673 4.665-2.055-2.052A.9.9 0 005.364 10.6l2.691 2.687a.9.9 0 001.272 0l5.309-5.3z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?20:+e.width,height:isNaN(e.height)?20:+e.height}))};p.mountIcon=_;const h=p},536741:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 20 16",u="dropdown_20",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 16" id="dropdown_20"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.22 5.875a1 1 0 011.405-.156L10 9.22l4.375-3.5a1 1 0 011.25 1.562l-5 4a1 1 0 01-1.25 0l-5-4a1 1 0 01-.156-1.406z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?20:+e.width,height:isNaN(e.height)?16:+e.height}))};p.mountIcon=_;const h=p},733024:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="cancel_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="cancel_24"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><path d="M18.3 5.7a.99.99 0 00-1.4 0L12 10.6 7.1 5.7a.99.99 0 00-1.4 1.4l4.9 4.9-4.9 4.9a.99.99 0 001.4 1.4l4.9-4.9 4.9 4.9a.99.99 0 001.4-1.4L13.4 12l4.9-4.9a.99.99 0 000-1.4z" fill="currentColor" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},676750:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="check_box_off_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="check_box_off_24"><path d="M16.872 2c1.783 0 2.43.186 3.082.534.651.349 1.163.86 1.512 1.512S22 5.345 22 7.128v9.744c0 1.783-.186 2.43-.534 3.082a3.635 3.635 0 01-1.512 1.512c-.652.348-1.299.534-3.082.534H7.128c-1.783 0-2.43-.186-3.082-.534s-1.163-.86-1.512-1.512C2.186 19.302 2 18.655 2 16.872V7.128c0-1.783.186-2.43.534-3.082a3.635 3.635 0 011.512-1.512C4.698 2.186 5.345 2 7.128 2zm.564 2H6.564c-.892 0-1.215.093-1.54.267-.327.174-.583.43-.757.756-.174.326-.267.65-.267 1.54v10.873c0 .892.093 1.215.267 1.54.174.327.43.583.756.757.326.174.65.267 1.54.267h10.873c.892 0 1.215-.093 1.54-.267.327-.174.583-.43.757-.756.174-.326.267-.65.267-1.54V6.563c0-.892-.093-1.215-.267-1.54a1.817 1.817 0 00-.756-.757c-.326-.174-.65-.267-1.54-.267z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},618858:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="check_box_on_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="check_box_on_24"><path clip-rule="evenodd" d="M2.436 4.184C2 5.04 2 6.16 2 8.4v7.2c0 2.24 0 3.36.436 4.216a4 4 0 001.748 1.748C5.04 22 6.16 22 8.4 22h7.2c2.24 0 3.36 0 4.216-.436a4 4 0 001.748-1.748C22 18.96 22 17.84 22 15.6V8.4c0-2.24 0-3.36-.436-4.216a4 4 0 00-1.748-1.748C18.96 2 17.84 2 15.6 2H8.4c-2.24 0-3.36 0-4.216.436a4 4 0 00-1.748 1.748zm15.771 5.023a1 1 0 00-1.414-1.414L10 14.586l-2.793-2.793a1 1 0 00-1.414 1.414l3.5 3.5a1 1 0 001.414 0z" fill="currentColor" fill-rule="evenodd" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},237432:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="check_circle_off_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="check_circle_off_24"><path d="M12 0c6.629 0 12 5.373 12 12 0 6.629-5.373 12-12 12-6.629 0-12-5.373-12-12C0 5.371 5.373 0 12 0zm0 1.5C6.2 1.5 1.5 6.2 1.5 12S6.2 22.5 12 22.5 22.5 17.8 22.5 12 17.8 1.5 12 1.5z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},482792:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="check_circle_on_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="check_circle_on_24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12zm6.207-14.793a1 1 0 00-1.414-1.414L10 14.586l-2.793-2.793a1 1 0 00-1.414 1.414l3.5 3.5a1 1 0 001.414 0l7.5-7.5z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},783199:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 16 24",u="chevron_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 24" id="chevron_24"><g fill="none" fill-rule="evenodd"><path d="M0 0h16v24H0z" /><path d="M4.706 7.706a1 1 0 010-1.412l.088-.088a.997.997 0 011.414.002l5.084 5.084a.998.998 0 010 1.416l-5.084 5.084a1.002 1.002 0 01-1.414.002l-.088-.088a.995.995 0 010-1.412L9 12 4.706 7.706z" fill="currentColor" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?16:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},105103:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="chevron_down_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="chevron_down_24"><path d="M12 13.698L6.64 9.232a1 1 0 00-1.28 1.536l6 5a1 1 0 001.28 0l6-5a1 1 0 10-1.28-1.536z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},713327:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="dismiss_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="dismiss_24"><g fill="currentColor"><path d="M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12z" opacity=".12" /><path d="M16.736 7.264a.9.9 0 010 1.272L13.273 12l3.463 3.464a.9.9 0 01.081 1.18l-.08.092a.9.9 0 01-1.273 0L12 13.273l-3.464 3.463a.9.9 0 11-1.272-1.272L10.727 12 7.264 8.536a.9.9 0 01-.08-1.18l.08-.092a.9.9 0 011.272 0L12 10.727l3.464-3.463a.9.9 0 011.272 0z" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},625578:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="dismiss_dark_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="dismiss_dark_24"><path d="M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12z" fill="#000" opacity=".24" /><path d="M16.736 7.264a.9.9 0 010 1.272L13.273 12l3.463 3.464a.9.9 0 01.081 1.18l-.08.092a.9.9 0 01-1.273 0L12 13.273l-3.464 3.463a.9.9 0 11-1.272-1.272L10.727 12 7.264 8.536a.9.9 0 01-.08-1.18l.08-.092a.9.9 0 011.272 0L12 10.727l3.464-3.463a.9.9 0 011.272 0z" fill="#fff" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},684773:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="dismiss_substract_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="dismiss_substract_24"><path d="M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0zm4.736 7.264a.9.9 0 00-1.272 0L12 10.727 8.536 7.264l-.092-.08a.9.9 0 00-1.18.08l-.08.092a.9.9 0 00.08 1.18L10.727 12l-3.463 3.464a.9.9 0 101.272 1.272L12 13.273l3.464 3.463.092.08a.9.9 0 001.18-.08l.08-.092a.9.9 0 00-.08-1.18L13.273 12l3.463-3.464a.9.9 0 000-1.272z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},495707:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="done_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="done_24"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><path d="M9 16.2l-3.5-3.5a.99.99 0 10-1.4 1.4l4.193 4.193a1 1 0 001.414 0L20.3 7.7a.99.99 0 00-1.4-1.4L9 16.2z" fill="currentColor" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},522429:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="reorder_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="reorder_24"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><path d="M21 18a1 1 0 01-1 1H4a1 1 0 010-2h16a1 1 0 011 1zm0-4a1 1 0 01-1 1H4a1 1 0 010-2h16a1 1 0 011 1zm0-4a1 1 0 01-1 1H4a1 1 0 010-2h16a1 1 0 011 1zM3 6a1 1 0 011-1h16a1 1 0 010 2H4a1 1 0 01-1-1z" fill="currentColor" fill-rule="nonzero" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},572960:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="reorder_ios_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="reorder_ios_24"><g fill="none" fill-rule="evenodd"><path opacity=".1" d="M0 0h24v24H0z" /><path d="M2.75 7h18.5a.75.75 0 110 1.5H2.75a.75.75 0 010-1.5zm0 4h18.5a.75.75 0 110 1.5H2.75a.75.75 0 110-1.5zm0 4h18.5a.75.75 0 110 1.5H2.75a.75.75 0 110-1.5z" fill="currentColor" fill-rule="nonzero" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},254589:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="send_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="send_24"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><path d="M5.739 15.754c-.686 1.855-1.117 3.158-1.293 3.91-.553 2.362-.956 2.894 1.107 1.771 2.062-1.122 12.046-6.683 14.274-7.919 2.904-1.611 2.942-1.485-.156-3.196-2.36-1.302-12.227-6.718-14.118-7.782-1.892-1.063-1.66-.59-1.107 1.772.178.761.616 2.076 1.311 3.944a4 4 0 002.988 2.531l5.765 1.117a.1.1 0 010 .196l-5.778 1.116a4 4 0 00-2.993 2.54z" fill="currentColor" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},956772:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 24 24",u="spinner_24",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" id="spinner_24"><path clip-rule="evenodd" d="M16.394 5.077A8.2 8.2 0 004.58 15.49a.9.9 0 01-1.628.767A10 10 0 1112 22a.9.9 0 010-1.8 8.2 8.2 0 004.394-15.123z" fill="currentColor" fill-rule="evenodd" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?24:+e.width,height:isNaN(e.height)?24:+e.height}))};p.mountIcon=_;const h=p},375087:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 28 28",u="add_circle_outline_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" id="add_circle_outline_28"><path d="M14 2c6.627 0 12 5.373 12 12s-5.373 12-12 12S2 20.627 2 14 7.373 2 14 2zm0 2C8.477 4 4 8.477 4 14s4.477 10 10 10 10-4.477 10-10S19.523 4 14 4zm0 4a1 1 0 011 1v4h4a1 1 0 110 2h-4v4a1 1 0 11-2 0v-4H9a1 1 0 110-2h4V9a1 1 0 011-1z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?28:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},364379:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 28 28",u="arrow_left_outline_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" id="arrow_left_outline_28"><g fill="none" fill-rule="evenodd"><path d="M28 0H0v28h28z" /><path d="M12.293 6.293a1 1 0 011.414 1.414L8.414 13H22a1 1 0 01.993.883L23 14a1 1 0 01-1 1H8.414l5.293 5.293a1 1 0 01.083 1.32l-.083.094a1 1 0 01-1.414 0l-7-7-.073-.082A1.005 1.005 0 015 14l.004.09A1.006 1.006 0 015 14.02V14a1.02 1.02 0 01.125-.484.878.878 0 01.071-.111.999.999 0 01.097-.112l-.08.09c.025-.031.051-.062.08-.09z" fill="currentColor" fill-rule="nonzero" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?28:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},284496:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 28 28",u="attach_outline_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" id="attach_outline_28"><g fill="none" fill-rule="evenodd"><path d="M0 0h28v28H0z" /><path d="M14.189 10.897a1 1 0 111.414 1.414l-4.172 4.172a1.504 1.504 0 000 2.121c.6.6 1.554.567 2.121 0l7.778-7.778c1.602-1.601 1.514-4.143 0-5.657-1.514-1.514-4.055-1.601-5.656 0l-7.779 7.779c-2.55 2.55-2.503 6.689 0 9.192s6.642 2.55 9.193 0l4.172-4.172a1 1 0 011.414 1.414l-4.172 4.172c-3.34 3.34-8.744 3.277-12.02 0-3.278-3.277-3.34-8.682 0-12.02l7.777-7.779c2.406-2.405 6.212-2.274 8.486 0 2.274 2.274 2.405 6.08 0 8.485l-7.779 7.779c-1.327 1.327-3.546 1.403-4.95 0-1.403-1.404-1.326-3.623 0-4.95l4.173-4.172z" fill="currentColor" fill-rule="nonzero" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?28:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},656294:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 28 28",u="cancel_outline_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" id="cancel_outline_28"><g fill="none" fill-rule="evenodd"><path d="M0 0h28v28H0z" /><path d="M6.293 6.293a1 1 0 011.414 0L14 12.585l6.293-6.292a1 1 0 011.32-.083l.094.083a1 1 0 010 1.414L15.415 14l6.292 6.293a1 1 0 01.083 1.32l-.083.094a1 1 0 01-1.414 0L14 15.415l-6.293 6.292a1 1 0 01-1.32.083l-.094-.083a1 1 0 010-1.414L12.585 14 6.293 7.707a1 1 0 01-.083-1.32z" fill="currentColor" fill-rule="nonzero" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?28:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},21414:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 28 28",u="check_circle_outline_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" id="check_circle_outline_28"><g fill-rule="nonzero" fill="none"><path d="M0 0h28v28H0z" /><path d="M14 2c6.627 0 12 5.373 12 12s-5.373 12-12 12S2 20.627 2 14 7.373 2 14 2zm0 2C8.477 4 4 8.477 4 14s4.477 10 10 10 10-4.477 10-10S19.523 4 14 4zm4.29 6.29c.39-.39 1.03-.39 1.42 0 .39.39.39 1.03 0 1.42l-7.003 6.997a1 1 0 01-1.414 0l-3.5-3.5a1 1 0 011.414-1.414L12 16.586z" fill="currentColor" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?28:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},111445:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 20 28",u="chevron_back_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 28" id="chevron_back_28"><g fill="none" fill-rule="evenodd"><path d="M0 0h20v28H0z" /><path d="M4.56 12.94L13 4.5a1.414 1.414 0 012 2L7.5 14l7.5 7.5a1.414 1.414 0 01-2 2l-8.44-8.44a1.5 1.5 0 010-2.12z" fill="currentColor" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?20:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},329524:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 28 28",u="chevron_left_outline_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" id="chevron_left_outline_28"><path d="M12.414 14l5.793-5.793a1 1 0 00-1.414-1.414l-6.5 6.5a1 1 0 000 1.414l6.5 6.5a1 1 0 001.414-1.414z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?28:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},451751:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 28 28",u="done_outline_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" id="done_outline_28"><g fill="none" fill-rule="evenodd"><path d="M0 0h28v28H0z" /><path d="M11 18.586l-5.293-5.293a1 1 0 10-1.414 1.414l6 6a1 1 0 001.414 0l12-12a1 1 0 10-1.414-1.414L11 18.586z" fill="currentColor" fill-rule="nonzero" /></g></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?28:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},527262:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 28 28",u="edit_outline_28",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" id="edit_outline_28"><path fill-rule="evenodd" clip-rule="evenodd" d="M21.782 3.335a3 3 0 00-2.724 0c-.428.218-.8.591-1.23 1.023L4.677 17.508c-.354.355-.609.609-.818.897a4.5 4.5 0 00-.804 1.94C3 20.698 3 21.058 3 21.558V22.681c-.001.282-.002.628.098.937a2 2 0 001.284 1.284c.309.1.655.1.937.098H6.443c.5 0 .86 0 1.211-.055a4.5 4.5 0 001.941-.804c.288-.21.542-.464.896-.818l13.151-13.15c.432-.431.805-.803 1.023-1.231a3 3 0 000-2.724c-.218-.428-.591-.8-1.023-1.23l-.63-.63c-.43-.432-.802-.805-1.23-1.023zm-1.816 1.782a1 1 0 01.908 0c.106.054.237.168.819.75l.44.44c.582.582.696.713.75.819a1 1 0 010 .908c-.054.106-.168.237-.75.819l-.858.858-2.986-2.986.858-.858c.582-.582.713-.696.82-.75zM16.875 8.14L6.142 18.872c-.425.425-.56.564-.665.708a2.5 2.5 0 00-.446 1.079c-.028.176-.03.369-.03.97v.971c-.001.197 0 .305.004.383v.012h.012c.078.005.186.005.383.005h.97c.602 0 .795-.003.971-.03a2.5 2.5 0 001.079-.447c.144-.105.283-.24.708-.665l10.733-10.733-2.986-2.986z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?28:+e.width,height:isNaN(e.height)?28:+e.height}))};p.mountIcon=_;const h=p},916237:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 32 32",u="spinner_32",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" id="spinner_32"><path d="M16 32a1.5 1.5 0 010-3c7.18 0 13-5.82 13-13S23.18 3 16 3 3 8.82 3 16c0 1.557.273 3.074.8 4.502A1.5 1.5 0 11.986 21.54 15.97 15.97 0 010 16C0 7.163 7.163 0 16 0s16 7.163 16 16-7.163 16-16 16z" fill="currentColor" fill-rule="nonzero" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?32:+e.width,height:isNaN(e.height)?32:+e.height}))};p.mountIcon=_;const h=p},36890:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 44 44",u="spinner_44",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44" id="spinner_44"><path d="M22 44a1.5 1.5 0 010-3c10.493 0 19-8.507 19-19S32.493 3 22 3 3 11.507 3 22c0 2.208.376 4.363 1.103 6.397a1.5 1.5 0 11-2.825 1.01A21.964 21.964 0 010 22C0 9.85 9.85 0 22 0s22 9.85 22 22-9.85 22-22 22z" fill="currentColor" fill-rule="nonzero" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?44:+e.width,height:isNaN(e.height)?44:+e.height}))};p.mountIcon=_;const h=p},213795:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 48 48",u="writebar_done_48",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" id="writebar_done_48"><path d="M24 7c9.389 0 17 7.611 17 17s-7.611 17-17 17S7 33.389 7 24 14.611 7 24 7zm6.957 12.126a1 1 0 00-1.414 0L21.5 27.17l-3.46-3.46a1 1 0 10-1.414 1.415l4.167 4.166a1 1 0 001.414 0l8.75-8.75a1 1 0 000-1.414z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?48:+e.width,height:isNaN(e.height)?48:+e.height}))};p.mountIcon=_;const h=p},962633:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 48 48",u="writebar_send_48",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" id="writebar_send_48"><path d="M24 7c9.389 0 17 7.611 17 17s-7.611 17-17 17S7 33.389 7 24 14.611 7 24 7zm0 10h-.018a.99.99 0 00-.071.004L24 17a1.017 1.017 0 00-.52.146 1.045 1.045 0 00-.097.067l-.008.007-.082.073-5.5 5.5a1 1 0 001.414 1.414L23 20.414V30.5a1 1 0 102 0V20.414l3.793 3.793a1 1 0 001.414-1.414l-5.5-5.5-.082-.073-.008-.007.09.08a1.012 1.012 0 00-.559-.282.906.906 0 00-.129-.01L24 17z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?48:+e.width,height:isNaN(e.height)?48:+e.height}))};p.mountIcon=_;const h=p},457994:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(667294),o=n(887854),i=n.n(o),a=n(408091),s=n(634777),c=n(379333),l="0 0 56 56",u="note_pen_outline_56",d=!1;function _(){d||((0,s.addSpriteSymbol)(new(i())({id:u,viewBox:l,content:'<symbol fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 56" id="note_pen_outline_56"><path d="M17.038 6h14.931c1.626 0 2.938 0 4 .087 1.093.09 2.054.278 2.942.73a7.5 7.5 0 013.278 3.278c.68 1.334.782 2.888.81 4.885v.116A1.5 1.5 0 1140 15.13l-.001-.11c-.028-2.054-.16-2.932-.483-3.564a4.5 4.5 0 00-1.967-1.966c-.395-.202-.917-.34-1.825-.414C34.8 9 33.61 9 31.905 9H17.102c-1.705 0-2.894.001-3.82.077-.908.074-1.43.212-1.824.414a4.5 4.5 0 00-1.967 1.966c-.202.395-.34.917-.414 1.824C9 14.207 9 15.395 9 17.1v20.8c0 1.705.001 2.893.077 3.819.074.907.212 1.429.414 1.824a4.5 4.5 0 001.967 1.967c.395.2.916.34 1.825.413.925.076 2.114.077 3.819.077h14.803c1.705 0 2.894-.001 3.82-.077.907-.074 1.43-.212 1.824-.413a4.5 4.5 0 001.967-1.967c.3-.59.44-1.407.477-3.233a1.5 1.5 0 113 .06c-.037 1.82-.16 3.27-.804 4.535a7.5 7.5 0 01-3.278 3.278c-.888.452-1.849.641-2.942.73-1.062.087-2.374.087-4 .087H17.038c-1.626 0-2.938 0-4-.087-1.093-.089-2.054-.278-2.942-.73a7.5 7.5 0 01-3.278-3.278c-.453-.888-.642-1.849-.731-2.942C6 40.901 6 39.59 6 37.964V17.036c0-1.626 0-2.937.087-3.999.09-1.093.278-2.054.73-2.942a7.5 7.5 0 013.279-3.278c.888-.452 1.849-.641 2.942-.73C14.1 6 15.412 6 17.038 6z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M49.975 17.854a3.5 3.5 0 00-4.95 0L31.318 31.56A4.5 4.5 0 0030 34.743V37.5a1.5 1.5 0 001.5 1.5h2.757a4.5 4.5 0 003.182-1.318l13.707-13.707a3.5 3.5 0 000-4.95l-1.171-1.171zm-2.829 2.12a.5.5 0 01.708 0l1.171 1.172a.5.5 0 010 .708L47.5 23.379 45.621 21.5l1.525-1.525zM43.5 23.622l-10.06 10.06a1.5 1.5 0 00-.44 1.06V36h1.257a1.5 1.5 0 001.061-.44l10.06-10.06-1.878-1.879z" fill="currentColor" /><path d="M15.5 17a1.5 1.5 0 000 3h18a1.5 1.5 0 000-3h-18zm0 9a1.5 1.5 0 000 3h10a1.5 1.5 0 000-3h-10zM14 36.5a1.5 1.5 0 011.5-1.5h6a1.5 1.5 0 010 3h-6a1.5 1.5 0 01-1.5-1.5z" fill="currentColor" /></symbol>'})),d=!0)}var p=function(e){return(0,s.useIsomorphicLayoutEffect)((function(){_()}),[]),r.createElement(c.SvgIcon,(0,a.assign)({},e,{viewBox:l,id:u,width:isNaN(e.width)?56:+e.width,height:isNaN(e.height)?56:+e.height}))};p.mountIcon=_;const h=p},76854:(e,t,n)=>{"use strict";n.d(t,{IconSettingsContext:()=>i,IconSettingsProvider:()=>a});var r=n(667294);function o(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=(0,r.createContext)({}),a=function(e){var t=e.children,n=o(e,["children"]),a=(0,r.useMemo)((function(){return n}),[n.classPrefix,n.globalClasses]);return r.createElement(i.Provider,{value:a},t)}},379333:(e,t,n)=>{"use strict";n.d(t,{SvgIcon:()=>d});var r=n(667294),o=n(76854);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var u={display:"block"};var d=function(e){var t=e.width,n=e.height,a=e.viewBox,c=e.id,d=e.className,_=e.style,p=e.fill,h=e.getRootRef,f=e.Component,m=l(e,["width","height","viewBox","id","className","style","fill","getRootRef","Component"]),v=Math.max(t,n),g=(0,r.useContext)(o.IconSettingsContext),y=function(e,t){for(var n=t.classPrefix,r=t.globalClasses,o="",i=0;i<e.length;i++)n&&(o+=" "+(n+e[i])),n&&!r||(o+=" "+e[i]);return o}(["Icon","Icon--".concat(v),"Icon--w-".concat(t),"Icon--h-".concat(n),"Icon--".concat(c)],g);return r.createElement(f,i({role:"presentation"},m,{ref:h,className:"".concat(y," ").concat(d),style:s(s({},_),{},{width:t,height:n})}),r.createElement("svg",{viewBox:a,width:t,height:n,style:u},r.createElement("use",{xlinkHref:"#".concat(c),style:{fill:"currentColor",color:p}})))};d.defaultProps={Component:"div",className:"",style:{}}},634777:(e,t,n)=>{"use strict";n.d(t,{addSpriteSymbol:()=>u,useIsomorphicLayoutEffect:()=>d});var r,o=n(362548),i=n.n(o),a=n(667294),s=!("undefined"==typeof window||!window.document||!window.document.createElement);if(s){var c="__SVG_SPRITE_NODE__";r=new(i())({attrs:{id:c}});var l=function(){var e=document.getElementById(c);e?r.attach(e):r.mount()};document.querySelector("body")?l():document.addEventListener("DOMContentLoaded",l)}else r=null;function u(e){r&&r.add(e)}var d=s?a.useLayoutEffect:a.useEffect},406257:e=>{var t=function(){"undefined"!=typeof document&&document.currentScript&&document.currentScript.src;return function(e){var t,n,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,n=r}));var o,i={};for(o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);var a,s=[],c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),c=0!==c.indexOf("blob:")?c.substr(0,c.lastIndexOf("/")+1):"";var l=r.print||console.log.bind(console),u=r.printErr||console.warn.bind(console);for(o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);i=null,r.arguments&&(s=r.arguments),r.thisProgram&&r.thisProgram,r.quit&&r.quit;var d,_=0;r.wasmBinary&&(d=r.wasmBinary);var p;r.noExitRuntime;"object"!=typeof WebAssembly&&H("no native wasm support detected");var h=!1;var f="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function m(e,t,n){for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.subarray&&f)return f.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|c:(7&a)<<18|s<<12|c<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var l=a-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function v(e,t){return e?m(E,e,t):""}var g,y,E,w,b,C,S,T,A,D="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function P(e,t){for(var n=e,r=n>>1,o=r+t/2;!(r>=o)&&b[r];)++r;if((n=r<<1)-e>32&&D)return D.decode(E.subarray(e,n));for(var i="",a=0;!(a>=t/2);++a){var s=w[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function O(e,t,n){if(void 0===n&&(n=2147483647),n<2)return 0;for(var r=t,o=(n-=2)<2*e.length?n/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);w[t>>1]=a,t+=2}return w[t>>1]=0,t-r}function I(e){return 2*e.length}function k(e,t){for(var n=0,r="";!(n>=t/4);){var o=C[e+4*n>>2];if(0==o)break;if(++n,o>=65536){var i=o-65536;r+=String.fromCharCode(55296|i>>10,56320|1023&i)}else r+=String.fromCharCode(o)}return r}function R(e,t,n){if(void 0===n&&(n=2147483647),n<4)return 0;for(var r=t,o=r+n-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i);if(C[t>>2]=a,(t+=4)+4>o)break}return C[t>>2]=0,t-r}function M(e){for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r>=55296&&r<=57343&&++n,t+=4}return t}function L(e){g=e,r.HEAP8=y=new Int8Array(e),r.HEAP16=w=new Int16Array(e),r.HEAP32=C=new Int32Array(e),r.HEAPU8=E=new Uint8Array(e),r.HEAPU16=b=new Uint16Array(e),r.HEAPU32=S=new Uint32Array(e),r.HEAPF32=T=new Float32Array(e),r.HEAPF64=A=new Float64Array(e)}r.INITIAL_MEMORY;var x,N=[],B=[],U=[];var F=0,W=null,V=null;function H(e){r.onAbort&&r.onAbort(e),u(e+=""),h=!0,1,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}r.preloadedImages={},r.preloadedAudios={};var j,K;function z(e){return e.startsWith("data:application/octet-stream;base64,")}function G(e){try{if(e==j&&d)return new Uint8Array(d);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}catch(e){H(e)}}function q(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?x.get(n)():x.get(n)(t.arg):n(void 0===t.arg?null:t.arg)}else t(r)}}function Y(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}z(j="libvpx.wasm")||(K=j,j=r.locateFile?r.locateFile(K,c):c+K);var $=void 0;function X(e){for(var t="",n=e;E[n];)t+=$[E[n++]];return t}var Q={},J={},Z={};function ee(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function te(e,t){return e=ee(e),function(){return t.apply(this,arguments)}}function ne(e,t){var n=te(t,(function(e){this.name=t,this.message=e;var n=new Error(e).stack;void 0!==n&&(this.stack=this.toString()+"\n"+n.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},n}var re=void 0;function oe(e){throw new re(e)}var ie=void 0;function ae(e){throw new ie(e)}function se(e,t,n){function r(t){var r=n(t);r.length!==e.length&&ae("Mismatched type converter count");for(var o=0;o<e.length;++o)ce(e[o],r[o])}e.forEach((function(e){Z[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){J.hasOwnProperty(e)?o[t]=J[e]:(i.push(e),Q.hasOwnProperty(e)||(Q[e]=[]),Q[e].push((function(){o[t]=J[e],++a===i.length&&r(o)})))})),0===i.length&&r(o)}function ce(e,t,n){if(n=n||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=t.name;if(e||oe('type "'+r+'" must have a positive integer typeid pointer'),J.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;oe("Cannot register type '"+r+"' twice")}if(J[e]=t,delete Z[e],Q.hasOwnProperty(e)){var o=Q[e];delete Q[e],o.forEach((function(e){e()}))}}function le(e){if(!(this instanceof be))return!1;if(!(e instanceof be))return!1;for(var t=this.$$.ptrType.registeredClass,n=this.$$.ptr,r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o}function ue(e){oe(e.$$.ptrType.registeredClass.name+" instance already deleted")}var de=!1;function _e(e){}function pe(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function he(e){return"undefined"==typeof FinalizationGroup?(he=function(e){return e},e):(de=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next()){var n=t.value;n.ptr?pe(n):console.warn("object already deleted: "+n.ptr)}})),he=function(e){return de.register(e,e.$$,e.$$),e},_e=function(e){de.unregister(e.$$)},he(e))}function fe(){if(this.$$.ptr||ue(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=he(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function me(){this.$$.ptr||ue(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&oe("Object already scheduled for deletion"),_e(this),pe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ve(){return!this.$$.ptr}var ge=void 0,ye=[];function Ee(){for(;ye.length;){var e=ye.pop();e.$$.deleteScheduled=!1,e.delete()}}function we(){return this.$$.ptr||ue(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&oe("Object already scheduled for deletion"),ye.push(this),1===ye.length&&ge&&ge(Ee),this.$$.deleteScheduled=!0,this}function be(){}var Ce={};function Se(e,t,n){if(void 0===e[t].overloadTable){var r=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||oe("Function '"+n+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}}function Te(e,t,n){r.hasOwnProperty(e)?((void 0===n||void 0!==r[e].overloadTable&&void 0!==r[e].overloadTable[n])&&oe("Cannot register public name '"+e+"' twice"),Se(r,e,e),r.hasOwnProperty(n)&&oe("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),r[e].overloadTable[n]=t):(r[e]=t,void 0!==n&&(r[e].numArguments=n))}function Ae(e,t,n,r,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function De(e,t,n){for(;t!==n;)t.upcast||oe("Expected null or instance of "+n.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Pe(e,t){if(null===t)return this.isReference&&oe("null is not a valid "+this.name),0;t.$$||oe('Cannot pass "'+at(t)+'" as a '+this.name),t.$$.ptr||oe("Cannot pass deleted object as a pointer of type "+this.name);var n=t.$$.ptrType.registeredClass;return De(t.$$.ptr,n,this.registeredClass)}function Oe(e,t){var n;if(null===t)return this.isReference&&oe("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;t.$$||oe('Cannot pass "'+at(t)+'" as a '+this.name),t.$$.ptr||oe("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&oe("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;if(n=De(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&oe("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:oe("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,rt((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,n)}break;default:oe("Unsupporting sharing policy")}return n}function Ie(e,t){if(null===t)return this.isReference&&oe("null is not a valid "+this.name),0;t.$$||oe('Cannot pass "'+at(t)+'" as a '+this.name),t.$$.ptr||oe("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&oe("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;return De(t.$$.ptr,n,this.registeredClass)}function ke(e){return this.fromWireType(S[e>>2])}function Re(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Me(e){this.rawDestructor&&this.rawDestructor(e)}function Le(e){null!==e&&e.delete()}function xe(e,t,n){if(t===n)return e;if(void 0===n.baseClass)return null;var r=xe(e,t,n.baseClass);return null===r?null:n.downcast(r)}function Ne(){return Object.keys(Fe).length}function Be(){var e=[];for(var t in Fe)Fe.hasOwnProperty(t)&&e.push(Fe[t]);return e}function Ue(e){ge=e,ye.length&&ge&&ge(Ee)}var Fe={};function We(e,t){return t=function(e,t){for(void 0===t&&oe("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),Fe[t]}function Ve(e,t){return t.ptrType&&t.ptr||ae("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&ae("Both smartPtrType and smartPtr must be specified"),t.count={value:1},he(Object.create(e,{$$:{value:t}}))}function He(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=We(this.registeredClass,t);if(void 0!==n){if(0===n.$$.count.value)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?Ve(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ve(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=Ce[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=xe(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?Ve(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):Ve(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function je(e,t,n,r,o,i,a,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,o||void 0!==t.baseClass?this.toWireType=Oe:r?(this.toWireType=Pe,this.destructorFunction=null):(this.toWireType=Ie,this.destructorFunction=null)}function Ke(e,t,n){return e.includes("j")?function(e,t,n){var o=r["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)}(e,t,n):x.get(t).apply(null,n)}function ze(e,t){var n,r,o,i=(e=X(e)).includes("j")?(n=e,r=t,o=[],function(){o.length=arguments.length;for(var e=0;e<arguments.length;e++)o[e]=arguments[e];return Ke(n,r,o)}):x.get(t);return"function"!=typeof i&&oe("unknown function pointer with signature "+e+": "+t),i}var Ge=void 0;function qe(e){var t=ft(e),n=X(t);return pt(t),n}function Ye(e,t){var n=[],r={};throw t.forEach((function e(t){r[t]||J[t]||(Z[t]?Z[t].forEach(e):(n.push(t),r[t]=!0))})),new Ge(e+": "+n.map(qe).join([", "]))}function $e(e,t){for(var n=[],r=0;r<e;r++)n.push(C[(t>>2)+r]);return n}function Xe(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Qe(e,t,n,r,o){var i=t.length;i<2&&oe("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==n,s=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){s=!0;break}var l="void"!==t[0].name,u=i-2,d=new Array(u),_=[],p=[];return function(){var n;arguments.length!==u&&oe("function "+e+" called with "+arguments.length+" arguments, expected "+u+" args!"),p.length=0,_.length=a?2:1,_[0]=o,a&&(n=t[1].toWireType(p,this),_[1]=n);for(var i=0;i<u;++i)d[i]=t[i+2].toWireType(p,arguments[i]),_.push(d[i]);var c=r.apply(null,_);function h(e){if(s)Xe(p);else for(var r=a?1:2;r<t.length;r++){var o=1===r?n:d[r-2];null!==t[r].destructorFunction&&t[r].destructorFunction(o)}if(l)return t[0].fromWireType(e)}return h(c)}}var Je=[],Ze=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function et(e){e>4&&0==--Ze[e].refcount&&(Ze[e]=void 0,Je.push(e))}function tt(){for(var e=0,t=5;t<Ze.length;++t)void 0!==Ze[t]&&++e;return e}function nt(){for(var e=5;e<Ze.length;++e)if(void 0!==Ze[e])return Ze[e];return null}function rt(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Je.length?Je.pop():Ze.length;return Ze[t]={refcount:1,value:e},t}}function ot(e,t,n){switch(t){case 0:return function(e){var t=n?y:E;return this.fromWireType(t[e])};case 1:return function(e){var t=n?w:b;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=n?C:S;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function it(e,t){var n=J[e];return void 0===n&&oe(t+" has unknown type "+qe(e)),n}function at(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function st(e,t){switch(t){case 2:return function(e){return this.fromWireType(T[e>>2])};case 3:return function(e){return this.fromWireType(A[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function ct(e,t,n){switch(t){case 0:return n?function(e){return y[e]}:function(e){return E[e]};case 1:return n?function(e){return w[e>>1]}:function(e){return b[e>>1]};case 2:return n?function(e){return C[e>>2]}:function(e){return S[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function lt(e){try{return p.grow(e-g.byteLength+65535>>>16),L(p.buffer),1}catch(e){}}var ut={mappings:{},buffers:[null,[],[]],printChar:function(e,t){var n=ut.buffers[e];0===t||10===t?((1===e?l:u)(m(n,0)),n.length=0):n.push(t)},varargs:void 0,get:function(){return ut.varargs+=4,C[ut.varargs-4>>2]},getStr:function(e){return v(e)},get64:function(e,t){return e}};!function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);$=e}(),re=r.BindingError=ne(Error,"BindingError"),ie=r.InternalError=ne(Error,"InternalError"),be.prototype.isAliasOf=le,be.prototype.clone=fe,be.prototype.delete=me,be.prototype.isDeleted=ve,be.prototype.deleteLater=we,je.prototype.getPointee=Re,je.prototype.destructor=Me,je.prototype.argPackAdvance=8,je.prototype.readValueFromPointer=ke,je.prototype.deleteObject=Le,je.prototype.fromWireType=He,r.getInheritedInstanceCount=Ne,r.getLiveInheritedInstances=Be,r.flushPendingDeletes=Ee,r.setDelayFunction=Ue,Ge=r.UnboundTypeError=ne(Error,"UnboundTypeError"),r.count_emval_handles=tt,r.get_first_emval=nt;var dt,_t={y:function(e,t,n,r,o){},H:function(e,t,n,r,o){var i=Y(n);ce(e,{name:t=X(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:o},argPackAdvance:8,readValueFromPointer:function(e){var r;if(1===n)r=y;else if(2===n)r=w;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+t);r=C}return this.fromWireType(r[e>>i])},destructorFunction:null})},t:function(e,t,n,o,i,a,s,c,l,u,d,_,p){d=X(d),a=ze(i,a),c&&(c=ze(s,c)),u&&(u=ze(l,u)),p=ze(_,p);var h=ee(d);Te(h,(function(){Ye("Cannot construct "+d+" due to unbound types",[o])})),se([e,t,n],o?[o]:[],(function(t){var n,i;t=t[0],i=o?(n=t.registeredClass).instancePrototype:be.prototype;var s=te(h,(function(){if(Object.getPrototypeOf(this)!==l)throw new re("Use 'new' to construct "+d);if(void 0===_.constructor_body)throw new re(d+" has no accessible constructor");var e=_.constructor_body[arguments.length];if(void 0===e)throw new re("Tried to invoke ctor of "+d+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(_.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),l=Object.create(i,{constructor:{value:s}});s.prototype=l;var _=new Ae(d,s,l,p,n,a,c,u),f=new je(d,_,!0,!1,!1),m=new je(d+"*",_,!1,!1,!1),v=new je(d+" const*",_,!1,!0,!1);return Ce[e]={pointerType:m,constPointerType:v},function(e,t,n){r.hasOwnProperty(e)||ae("Replacing nonexistant public symbol"),void 0!==r[e].overloadTable&&void 0!==n?r[e].overloadTable[n]=t:(r[e]=t,r[e].argCount=n)}(h,s),[f,m,v]}))},p:function(e,t,n,r,o,i){var a;t>0||H("Assertion failed: "+a);var s=$e(t,n);o=ze(r,o),se([],[e],(function(e){var n="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new re("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){Ye("Cannot construct "+e.name+" due to unbound types",s)},se([],s,(function(r){return r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Qe(n,r,null,o,i),[]})),[]}))},e:function(e,t,n,r,o,i,a,s){var c=$e(n,r);t=X(t),i=ze(o,i),se([],[e],(function(e){var r=(e=e[0]).name+"."+t;function o(){Ye("Cannot call "+r+" due to unbound types",c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,u=l[t];return void 0===u||void 0===u.overloadTable&&u.className!==e.name&&u.argCount===n-2?(o.argCount=n-2,o.className=e.name,l[t]=o):(Se(l,t,r),l[t].overloadTable[n-2]=o),se([],c,(function(o){var s=Qe(r,o,e,i,a);return void 0===l[t].overloadTable?(s.argCount=n-2,l[t]=s):l[t].overloadTable[n-2]=s,[]})),[]}))},G:function(e,t){ce(e,{name:t=X(t),fromWireType:function(e){var t=Ze[e].value;return et(e),t},toWireType:function(e,t){return rt(t)},argPackAdvance:8,readValueFromPointer:ke,destructorFunction:null})},L:function(e,t,n,r){var o=Y(n);function i(){}t=X(t),i.values={},ce(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:ot(t,o,r),destructorFunction:null}),Te(t,i)},x:function(e,t,n){var r=it(e,"enum");t=X(t);var o=r.constructor,i=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:te(r.name+"_"+t,(function(){}))}});o.values[n]=i,o[t]=i},r:function(e,t,n){var r=Y(n);ce(e,{name:t=X(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+at(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:st(t,r),destructorFunction:null})},h:function(e,t,n,r,o){t=X(t),-1===o&&(o=4294967295);var i=Y(n),a=function(e){return e};if(0===r){var s=32-8*n;a=function(e){return e<<s>>>s}}var c=t.includes("unsigned");ce(e,{name:t,fromWireType:a,toWireType:function(e,n){if("number"!=typeof n&&"boolean"!=typeof n)throw new TypeError('Cannot convert "'+at(n)+'" to '+this.name);if(n<r||n>o)throw new TypeError('Passing a number "'+at(n)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+o+"]!");return c?n>>>0:0|n},argPackAdvance:8,readValueFromPointer:ct(t,i,0!==r),destructorFunction:null})},g:function(e,t,n){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=S,n=t[e>>=2],o=t[e+1];return new r(g,o,n)}ce(e,{name:n=X(n),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},s:function(e,t){var n="std::string"===(t=X(t));ce(e,{name:t,fromWireType:function(e){var t,r=S[e>>2];if(n)for(var o=e+4,i=0;i<=r;++i){var a=e+4+i;if(i==r||0==E[a]){var s=v(o,a-o);void 0===t?t=s:(t+=String.fromCharCode(0),t+=s),o=a+1}}else{var c=new Array(r);for(i=0;i<r;++i)c[i]=String.fromCharCode(E[e+4+i]);t=c.join("")}return pt(e),t},toWireType:function(e,t){var r;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||oe("Cannot pass non-string to std::string"),r=n&&o?function(){return function(e){for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r>=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}(t)}:function(){return t.length};var i=r(),a=ht(4+i+1);if(S[a>>2]=i,n&&o)(function(e,t,n,r){if(!(r>0))return 0;for(var o=n,i=n+r-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=i)break;t[n++]=s}else if(s<=2047){if(n+1>=i)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=i)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=i)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}t[n]=0})(t,E,a+4,i+1);else if(o)for(var s=0;s<i;++s){var c=t.charCodeAt(s);c>255&&(pt(a),oe("String has UTF-16 code units that do not fit in 8 bits")),E[a+4+s]=c}else for(s=0;s<i;++s)E[a+4+s]=t[s];return null!==e&&e.push(pt,a),a},argPackAdvance:8,readValueFromPointer:ke,destructorFunction:function(e){pt(e)}})},m:function(e,t,n){var r,o,i,a,s;n=X(n),2===t?(r=P,o=O,a=I,i=function(){return b},s=1):4===t&&(r=k,o=R,a=M,i=function(){return S},s=2),ce(e,{name:n,fromWireType:function(e){for(var n,o=S[e>>2],a=i(),c=e+4,l=0;l<=o;++l){var u=e+4+l*t;if(l==o||0==a[u>>s]){var d=r(c,u-c);void 0===n?n=d:(n+=String.fromCharCode(0),n+=d),c=u+t}}return pt(e),n},toWireType:function(e,r){"string"!=typeof r&&oe("Cannot pass non-string to C++ string type "+n);var i=a(r),c=ht(4+i+t);return S[c>>2]=i>>s,o(r,c+4,i+t),null!==e&&e.push(pt,c),c},argPackAdvance:8,readValueFromPointer:ke,destructorFunction:function(e){pt(e)}})},I:function(e,t){ce(e,{isVoid:!0,name:t=X(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},F:function(){throw"longjmp"},k:et,l:function(e){e>4&&(Ze[e].refcount+=1)},j:function(e,t){return rt((e=it(e,"_emval_take_value")).readValueFromPointer(t))},E:function(){H()},C:function(e,t,n){E.copyWithin(e,t,t+n)},D:function(e){var t,n,r=E.length,o=2147483648;if((e>>>=0)>o)return!1;for(var i=1;i<=4;i*=2){var a=r*(1+.2/i);if(a=Math.min(a,e+100663296),lt(Math.min(o,((t=Math.max(e,a))%(n=65536)>0&&(t+=n-t%n),t))))return!0}return!1},q:function(e,t,n,r){for(var o=0,i=0;i<n;i++){for(var a=C[t+8*i>>2],s=C[t+(8*i+4)>>2],c=0;c<s;c++)ut.printChar(e,E[a+c]);o+=s}return C[r>>2]=o,0},a:function(){return _},f:function(e){var t=Date.now();return C[e>>2]=t/1e3|0,C[e+4>>2]=t%1e3*1e3|0,0},d:function(e,t,n){var r=mt();try{return x.get(e)(t,n)}catch(e){if(vt(r),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},n:function(e,t,n,r){var o=mt();try{return x.get(e)(t,n,r)}catch(e){if(vt(o),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},o:function(e,t,n,r,o){var i=mt();try{return x.get(e)(t,n,r,o)}catch(e){if(vt(i),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},u:function(e,t,n,r,o,i){var a=mt();try{return x.get(e)(t,n,r,o,i)}catch(e){if(vt(a),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},K:function(e,t,n,r,o,i,a,s,c){var l=mt();try{return x.get(e)(t,n,r,o,i,a,s,c)}catch(e){if(vt(l),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},B:function(e,t,n,r,o,i,a,s){var c=mt();try{return yt(e,t,n,r,o,i,a,s)}catch(e){if(vt(c),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},z:function(e,t,n,r){var o=mt();try{return wt(e,t,n,r)}catch(e){if(vt(o),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},i:function(e,t){var n=mt();try{x.get(e)(t)}catch(e){if(vt(n),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},w:function(e,t,n){var r=mt();try{x.get(e)(t,n)}catch(e){if(vt(r),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},c:function(e,t,n,r,o){var i=mt();try{x.get(e)(t,n,r,o)}catch(e){if(vt(i),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},J:function(e,t,n,r,o,i,a){var s=mt();try{x.get(e)(t,n,r,o,i,a)}catch(e){if(vt(s),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},v:function(e,t,n,r,o,i,a,s,c){var l=mt();try{x.get(e)(t,n,r,o,i,a,s,c)}catch(e){if(vt(l),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},A:function(e,t,n,r,o,i,a,s,c,l){var u=mt();try{Et(e,t,n,r,o,i,a,s,c,l)}catch(e){if(vt(u),e!==e+0&&"longjmp"!==e)throw e;gt(1,0)}},b:function(e){_=e}},pt=(function(){var e={a:_t};function t(e,t){var n,o=e.exports;r.asm=o,L((p=r.asm.M).buffer),x=r.asm.Q,n=r.asm.N,B.unshift(n),function(e){if(F--,r.monitorRunDependencies&&r.monitorRunDependencies(F),0==F&&(null!==W&&(clearInterval(W),W=null),V)){var t=V;V=null,t()}}()}function o(e){t(e.instance)}function i(t){return(d||"function"!=typeof fetch?Promise.resolve().then((function(){return G(j)})):fetch(j,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+j+"'";return e.arrayBuffer()})).catch((function(){return G(j)}))).then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){u("failed to asynchronously prepare wasm: "+e),H(e)}))}if(F++,r.monitorRunDependencies&&r.monitorRunDependencies(F),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){return u("Module.instantiateWasm callback failed with error: "+e),!1}(d||"function"!=typeof WebAssembly.instantiateStreaming||z(j)||"function"!=typeof fetch?i(o):fetch(j,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(o,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),i(o)}))}))).catch(n)}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.N).apply(null,arguments)},r._free=function(){return(pt=r._free=r.asm.O).apply(null,arguments)}),ht=r._malloc=function(){return(ht=r._malloc=r.asm.P).apply(null,arguments)},ft=r.___getTypeName=function(){return(ft=r.___getTypeName=r.asm.R).apply(null,arguments)},mt=(r.___embind_register_native_and_builtin_types=function(){return(r.___embind_register_native_and_builtin_types=r.asm.S).apply(null,arguments)},r.stackSave=function(){return(mt=r.stackSave=r.asm.T).apply(null,arguments)}),vt=r.stackRestore=function(){return(vt=r.stackRestore=r.asm.U).apply(null,arguments)},gt=r._setThrew=function(){return(gt=r._setThrew=r.asm.V).apply(null,arguments)},yt=r.dynCall_iiiijj=function(){return(yt=r.dynCall_iiiijj=r.asm.W).apply(null,arguments)},Et=(r.dynCall_iiijiii=function(){return(r.dynCall_iiijiii=r.asm.X).apply(null,arguments)},r.dynCall_vijjjid=function(){return(Et=r.dynCall_vijjjid=r.asm.Y).apply(null,arguments)}),wt=r.dynCall_iij=function(){return(wt=r.dynCall_iij=r.asm.Z).apply(null,arguments)};r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm._).apply(null,arguments)};function bt(e){function n(){dt||(dt=!0,r.calledRun=!0,h||(!0,q(B),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)e=r.postRun.shift(),U.unshift(e);var e;q(U)}()))}e=e||s,F>0||(!function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)e=r.preRun.shift(),N.unshift(e);var e;q(N)}(),F>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(V=function e(){dt||bt(),dt||(V=e)},r.run=bt,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return bt(),e.ready}}();e.exports=t,t.getUrl=function(e){return"https://st.mycdn.me/static/libvpx/2-0-9/"+e}},988882:(e,t,n)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,{Config:()=>q,Connect:()=>fe,Messenger:()=>we});var o=["agreements","promo","vkc_behavior","vkc_auth_action","vkc_brand","vkc_display_mode","service_groups","external_device_id"],i=!("undefined"==typeof window||!window.document||!window.document.createElement),a=i&&!!window.addEventListener;function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function c(e,t){return e(t={exports:{}},t.exports),t.exports}var l=s(c((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}))),u=function(){};if(a)try{var d=Object.defineProperty({},"passive",{get:function(){}});window.addEventListener("test",u,d),window.removeEventListener("test",u,d)}catch(r){}!function(){if(!i)return!1;try{document.createElement("div").scrollTo({top:0,get behavior(){return!0,"smooth"}})}catch(e){}}();var _=c((function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0}));s(_);var p=c((function(e){e.exports=function(e){if(Array.isArray(e))return _(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));s(p);var h=c((function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));s(h);var f=c((function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return _(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0}));s(f);var m=c((function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}));s(m),s(c((function(e){e.exports=function(e){return p(e)||h(e)||f(e)||m()},e.exports.default=e.exports,e.exports.__esModule=!0})));var v=s(c((function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0})));function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!==l(e)||null===e)return"";t=y({encode:!0},t);var n=function(e){return t.encode?encodeURIComponent(e):String(e)};return Object.keys(e).reduce((function(r,o){var i=e[o];return void 0===i?r:null===i?(t.skipNull||r.push([n(o),""].join("=")),r):Array.isArray(i)?(i.map((function(e){r.push("".concat(n(o),"[]=").concat(n(e)))})).join(),r):(r.push([n(o),n(i)].join("=")),r)}),[]).join("&")};function w(e){return E(e)}function b(e){return Object.keys(e).filter((function(e){return o.includes(e)}))}function C(e){var t;return Boolean(null===(t=b(e))||void 0===t?void 0:t.length)}function S(e){var t=function(e){return b(e).reduce((function(t,n){return t[n]=e[n],t}),{})}(e);return btoa(JSON.stringify(t))}function T(e,t){var n,r,o=document.createElement("iframe");for(var i in e&&(o.src=e),o.style.cssText=null!==(n=null==t?void 0:t.cssText)&&void 0!==n?n:"",o.width="100%",o.height="100%",o.style.border="none",null==t?void 0:t.properties)t&&t.properties.hasOwnProperty(i)&&(o[i]=null!==(r=t.properties[i])&&void 0!==r?r:"");return o}function A(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return e&&"object"===r(e)};return e.reduce((function(e,t){return Object.keys(t).forEach((function(r){var o=e[r],i=t[r];Array.isArray(o)&&Array.isArray(i)?e[r]=o.concat.apply(o,i):n(o)&&n(i)?e[r]=A(o,i):e[r]=i})),e}),{})}function D(e,t){return void 0===e?t:"number"!=typeof e?e?1:0:e}function P(e,t){return e&&"object"===r(e)?Object.keys(e).reduce((function(n,r){return t.includes(r)?(n[r]=e[r],n):n}),{}):e}s(c((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0}))),s(c((function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0})));var O,I,k,R=new(function(){function e(){this.savedStyles=[],this.bodyScrollYValue=0,this.isFreezed=!1}return e.prototype.freezeBodyOverflow=function(){if(!this.isFreezed){this.isFreezed=!0;var e=(n=window.document.documentElement.clientWidth,Math.abs(window.innerWidth-n)),t=parseInt(window.getComputedStyle(window.document.body).paddingRight,10)||0;this.bodyScrollYValue=window.pageYOffset||window.scrollY,this.savedStyles=[],this.savedStyles.push({value:window.document.body.style.paddingRight,property:"padding-right"},{value:window.document.body.style.overflow,property:"overflow"},{value:window.document.body.style.overflowX,property:"overflow-x"},{value:window.document.body.style.overflowY,property:"overflow-y"}),window.document.body.style.setProperty("overflow","hidden"),window.document.body.style.setProperty("padding-right",e+t+"px")}var n},e.prototype.restoreBodyOverflow=function(){this.isFreezed&&(this.savedStyles.forEach((function(e){var t=e.value,n=e.property;t?window.document.body.style.setProperty(n,t):window.document.body.style.removeProperty(n)})),window.scrollTo(0,this.bodyScrollYValue),this.isFreezed=!1)},e}());!function(e){e.OPEN="VKSDKOpen",e.CLOSE="VKSDKClose",e.LOGOUT="VKSDKLogout",e.GET_CAPTCHA="VKSDKGetCaptcha",e.AUTH_NEEDED="VKSDKAuthNeeded",e.UPDATE_PARAMS="VKSDKUpdateParams",e.REQUEST_SUPERAPP_TOKEN="VKSDKRequestSuperAppToken",e.ERROR="VKSDKError"}(O||(O={})),function(e){e.INIT="VKSDKInit"}(I||(I={})),function(e){e[e.UNKNOWN=1]="UNKNOWN",e[e.MISSING_PARAM=2]="MISSING_PARAM",e[e.CONNECTION_LOST=3]="CONNECTION_LOST",e[e.USER_DENIED=4]="USER_DENIED",e[e.INVALID_PARAMS=5]="INVALID_PARAMS",e[e.CUSTOM=6]="CUSTOM",e[e.LOADING_ERROR=7]="LOADING_ERROR",e[e.CONNECT_WINDOW_CLOSED=7]="CONNECT_WINDOW_CLOSED",e[e.CONNECT_WINDOW_NOT_OPENED=8]="CONNECT_WINDOW_NOT_OPENED",e[e.CONNECT_DOMAIN_NOT_ALLOWED=9]="CONNECT_DOMAIN_NOT_ALLOWED",e[e.CONNECT_UNKNOWN_SDK_MESSAGE=10]="CONNECT_UNKNOWN_SDK_MESSAGE",e[e.CONNECT_CLIENT_SDK_ERROR=11]="CONNECT_CLIENT_SDK_ERROR",e[e.OLD_MISSING_PARAM=100]="OLD_MISSING_PARAM"}(k||(k={}));var M,L,x,N,B=function(e,t){return'Wrong "'+e+'" param. '+(t||"")},U=function(e){return'URL domain "'+e+'" is not allowed.'},F=function(e){return"This SDK message is unknown: "+e},W=function(e){return e.error+";"+e.errorCode},V=function(e,t){return(V=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},H=function(){return(H=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function j(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}!function(e){e.APP_CLOSE="VKWebAppClose",e.APP_READY="VKSDKMiniAppReady",e.RESIZE="VKSDKMiniAppResize",e.APP_INIT_CONFIG="VKSDKMiniAppInitConfig",e.OPEN_APP="VKWebAppOpenApp",e.OPEN_PAY_FORM="VKWebAppOpenPayForm",e.ACTION_DONE="VKWebAppActionDone",e.SET_TITLE="VKWebAppSetTitle",e.AUTH_BY_EXCHANGE_TOKEN="VKWebAppAuthByExchangeToken",e.FORCE_LOGOUT="VKWebAppForceLogout"}(M||(M={})),function(e){e.OPEN="open",e.HIDE="hide",e.CLOSE="close",e.SHOW="show",e.MESSAGE="message",e.CREATE_APP="createapp"}(L||(L={})),function(e){e.SUPERAPP_TOKEN="VKSDKGeneralSuperAppToken",e.AUTH_NEEDED="VKSDKGeneralAuthNeeded",e.OPEN_APP="VKSDKGeneralOpenApp"}(x||(x={})),function(e){e.SUPERAPP_TOKEN_CHANGE_V2="superAppTokenV2",e.SUPERAPP_TOKEN_CHANGE="superAppToken"}(N||(N={}));var K,z={appId:0,superAppToken:"",superAppTokenV2:"",loginDomain:"login.vk.com",oauthDomain:"oauth.vk.com",connectDomain:"id.vk.com",_debug:!1,_localhost:!1},G={},q=function(){function e(){}return e.init=function(e){if(!e.appId)throw new Error("appId required");z.appId=e.appId,z.superAppToken=e.superAppToken||"",z.superAppTokenV2=e.superAppTokenV2||"",z.loginDomain=e.loginDomain||"login.vk.com",z.oauthDomain=e.oauthDomain||"oauth.vk.com",z.connectDomain=e.connectDomain||"id.vk.com",z.appSettings=e.appSettings,z._debug=!!e._debug,z._localhost=!!e._localhost},e.get=function(){return z},e.setSuperAppToken=function(t,n){void 0===n&&(n={}),2===n.version?(z.superAppTokenV2=t,e.events.emit(N.SUPERAPP_TOKEN_CHANGE_V2,t)):(z.superAppToken=t,e.events.emit(N.SUPERAPP_TOKEN_CHANGE,t))},e.onRequestSuperAppToken=function(e){G.requestSuperAppToken=e},e._requestSuperAppToken=function(t,n){var r;void 0===n&&(n={}),G.requestSuperAppToken&&(r=G.requestSuperAppToken(t,n)),r&&r.then((function(t){return e.setSuperAppToken(t,n)})).catch(console.error)},e.onAuth=function(e){G.auth=e},e._auth=function(t){var n;void 0===t&&(t={}),G.auth&&(n=G.auth()),n&&n.then((function(n){e.setSuperAppToken(n,t)})).catch(console.error)},e.onOpenApp=function(e){G.openApp=e},e._openApp=function(e){G.openApp&&G.openApp(e.app)},e.onLogout=function(e){G.logout=e},e._logout=function(){G.logout&&G.logout()},e.events=j(),e}(),Y=function(e){var t=this;this.handler=function(){return{}},this.destroy=function(){delete t.config,window.removeEventListener("message",t.handleMessage)},this.onMessage=function(e){t.handler=e},this.sendMessage=function(e){var n;null===(n=t.config.iframe.contentWindow)||void 0===n||n.postMessage(H({type:"vk-sak-sdk"},e),t.config.origin)},this.handleMessage=function(e){t.config.origin&&e.origin===t.config.origin&&e.source===t.config.iframe.contentWindow&&e.data&&"vk-sak-sdk"===e.data.type&&t.handler(e.data)},this.config=e,window.addEventListener("message",this.handleMessage)},$=function e(t){var n=this;this.readyPromiseResolve=null,this.readyPromise=null,this.child=null,this.initialTitle=window.document.title,this.open=function(e,t){return n.loading?(n.iframe.src=n.getMiniAppUrl(e,t),n.loading=new Promise((function(e){n.iframe.onload=function(){n.iframe.onload=null,e()}})),n.readyPromise=new Promise((function(e){return n.readyPromiseResolve=e}))):n.preload(e,t).catch(console.error),n.iframe.style.display="block",n.params.stackMode||R.freezeBodyOverflow(),n.loading.then(n.handleResize).catch(console.error),n.events.emit(L.OPEN),n.readyPromise},this.hide=function(){n.iframe.style.display="none",n.params.stackMode||R.restoreBodyOverflow(),n.events.emit(L.HIDE)},this.close=function(e){window.document.title!==n.initialTitle&&(window.document.title=n.initialTitle),n.params.stackMode||R.restoreBodyOverflow(),n.iframe&&n.iframe.remove(),n.bridge&&n.bridge.destroy(),delete n.iframe,delete n.bridge,q.events.off(N.SUPERAPP_TOKEN_CHANGE,n.onSuperAppToken),window.removeEventListener("resize",n.handleResize),n.events.emit(L.CLOSE,e)},this.show=function(){if(!n.loading)throw new Error('App is not loaded, use "open" or "preload" methods');n.iframe.style.display="block",n.params.stackMode||R.freezeBodyOverflow(),n.events.emit(L.SHOW)},this.preload=function(e,t){var r=document.createElement("iframe"),o=window.innerHeight,i=isFinite(n.params.zIndex)?n.params.zIndex:999999;return r.src=n.getMiniAppUrl(e,t),r.setAttribute("allow","geolocation"),r.style.cssText="\n      display: none;\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: "+o+"px;\n      min-height: "+o+"px;\n      border: none;\n      z-index: "+i+";\n    ",n.iframe=r,document.body.appendChild(n.iframe),n.bridge=new Y({iframe:n.iframe,origin:"https://"+q.get().connectDomain}),n.loading=new Promise((function(e){r.onload=function(){r.onload=null,e()}})),n.readyPromise=new Promise((function(e){return n.readyPromiseResolve=e})),n.bridge.onMessage(n.handleMessage),q.events.on(N.SUPERAPP_TOKEN_CHANGE,n.onSuperAppToken),window.addEventListener("resize",n.handleResize),n.loading},this.sendMessage=function(e){n.bridge.sendMessage(e)},this.onSuperAppToken=function(e){n.bridge.sendMessage({handler:x.SUPERAPP_TOKEN,params:{result:e}})},this.handleMessage=function(e){switch(e.handler){case M.APP_CLOSE:n.hide();break;case M.APP_READY:n.resolveReadyPromise(),n.handleUpdateConfig();break;case M.OPEN_APP:n.openMiniapp(e.params);break;case M.OPEN_PAY_FORM:n.openPayForm(e.params);break;case M.SET_TITLE:n.setTitle(e.params);break;case M.AUTH_BY_EXCHANGE_TOKEN:n.onAuthByExchangeToken();break;case M.FORCE_LOGOUT:n.onForceLogout();break;case x.SUPERAPP_TOKEN:q._requestSuperAppToken(e.params);break;case x.AUTH_NEEDED:q._auth();break;default:n.events.emit(L.MESSAGE,e)}},this.handleResize=function(){if(n.iframe){var e=innerWidth,t=innerHeight;n.iframe.style.height=t+"px",n.iframe.style.minHeight=t+"px",n.bridge.sendMessage({handler:M.RESIZE,params:{viewport_width:e,viewport_height:t}})}},this.handleUpdateConfig=function(){n.bridge.sendMessage({handler:M.APP_INIT_CONFIG,params:{fullMode:n.params.fullMode,hideMenu:n.params.hideMenu}})},this.getMiniAppUrl=function(e,t){var r=q.get(),o=r.connectDomain,i=r.appId,a=r.superAppToken,s=r._debug;return"https://"+o+"/mini_app?"+w({app:n.params.app,host_app_id:i,debug:s?"1":"",localhost:s?"1":"",superapp_token:a,app_query:e?JSON.stringify(e):"",app_hash:t||""})},this.resolveReadyPromise=function(){n.readyPromise&&n.readyPromiseResolve&&(n.readyPromiseResolve(),n.readyPromise=null,n.readyPromiseResolve=null)},this.openMiniapp=function(t){n.child=new e({app:t.app_id,stackMode:n.params.stackMode}),n.events.emit(L.CREATE_APP,{app:n.child,location:t.location})},this.openPayForm=function(t){var r=H({},t.params);r.data&&(r.data=JSON.stringify(r.data));var o=H(H({},r),{app_id:t.app_id,action:t.action}),i=new e({app:6217559,stackMode:n.params.stackMode});i.open(o).then((function(){return n.hide()})).catch(console.error),i.events.on(L.MESSAGE,(function(e){n.handleVKPayFormMessage(e),i.close(),n.show()})),i.events.on(L.HIDE,(function(){i.close(),n.close()}))},this.setTitle=function(e){window.document.title=e.title},this.onAuthByExchangeToken=function(){n.close({closedByExchangeToken:!0})},this.onForceLogout=function(){n.close({closedByForceLogout:!0})},this.handleVKPayFormMessage=function(e){e.handler===M.ACTION_DONE&&n.sendMessage(e)},this.params=H(H({},t),{app:"number"==typeof t.app?"app"+t.app:t.app}),this.events=j()},X=(function(){function e(){this.stack=[]}e.prototype.removeMiniApp=function(e){var t=e.app,n=this.stack.lastIndexOf(t);if(n>-1&&n===this.stack.length-1)if(this.stack.splice(n,1),this.stack.length){this.stack[this.stack.length-1].show();var r=this.stack[this.stack.length-2];setTimeout((function(){return null==r?void 0:r.hide()}),0)}else R.restoreBodyOverflow()},e.prototype.makeHandleMiniAppClose=function(e){var t=this,n=e.app;return function(){t.removeMiniApp({app:n})}},e.prototype.makeHandleMiniAppHide=function(e){var t=this,n=e.app;return function(){var e=t.stack.lastIndexOf(n);e>-1&&e===t.stack.length-1&&setTimeout((function(){return n.close()}),0)}},e.prototype.handleMiniAppCreate=function(e){var t=e.app,n=e.query,r=e.hash;this.stack.push(t),t.open(n,r).catch(console.error),t.events.on(L.CREATE_APP,this.handleMiniAppCreate.bind(this)),t.events.on(L.HIDE,this.makeHandleMiniAppHide({app:t})),t.events.on(L.CLOSE,this.makeHandleMiniAppClose({app:t})),R.freezeBodyOverflow();var o=this.stack[this.stack.length-2];return setTimeout((function(){null==o||o.hide()}),0),t},Object.defineProperty(e.prototype,"length",{get:function(){return this.stack.length},enumerable:!1,configurable:!0}),e.prototype.open=function(e){var t=e.app,n=e.query,r=e.hash,o=new $({app:t,stackMode:!0});return this.handleMiniAppCreate({app:o,query:n,hash:r}),o},e.prototype.close=function(){var e=this.stack;this.stack.splice(0),e.reverse().forEach((function(e){return e.close()})),R.restoreBodyOverflow()}}(),"ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"),Q=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,t="",n=e;n--;)t+=X[64*Math.random()|0];return t};!function(e){e.STATIC_MAP="VKSDKRequestToGeoservice:staticmap/png/",e.SEARCH="VKSDKRequestToGeoservice:search",e.OVERALL="VKSDKRequestToGeoservice:overall",e.DIRECTIONS="VKSDKRequestToGeoservice:directions",e.ISO="VKSDKRequestToGeoservice:iso"}(K||(K={}));!function(){function e(e){var t=this;this.apiKey=e.apiKey;var n=document.createElement("iframe"),r=q.get().appId;n.src=this.getGeoserviceProxyUrl({app_id:r}),n.style.cssText="\n      display: none;\n    ",this.iframe=n,document.body.appendChild(this.iframe),this.bridge=new Y({iframe:this.iframe,origin:"https://"+q.get().connectDomain}),this.requestMap={},this.bridge.onMessage((function(e){var n=e.params,r=n.requestID,o=n.response;t.requestMap[r].resolve(o),delete t.requestMap[r]}))}e.prototype.setApiKey=function(e){this.apiKey=e},e.prototype.getGeoserviceProxyUrl=function(e){var t=q.get(),n=t.connectDomain,r=t._debug;return"https://"+n+"/geoservice?"+w(H(H({},e||{}),{origin:location.protocol+"//"+location.host,localhost:String(location.host.includes("localhost")),debug:location.host.includes("localhost")?1:String(r)}))},e.prototype.prepareAnswer=function(e,t,n){var r=this,o=Q();return this.bridge.sendMessage({handler:"VKSDKRequestToGeoservice:"+e,params:H(H({},t),{api_key:this.apiKey,wrapRequestInJSON:n,requestID:o})}),new Promise((function(e,t){r.requestMap[o]={resolve:e,reject:t}}))},e.prototype.getStaticMap=function(e){return this.prepareAnswer("staticmap/png/",e)},e.prototype.encodeCoords=function(e){return this.prepareAnswer("search",e)},e.prototype.decodeCoords=function(e){return this.prepareAnswer("overall",e)},e.prototype.getDirections=function(e){return this.prepareAnswer("directions",e,!0)},e.prototype.getISO=function(e){return this.prepareAnswer("iso",e,!0)}}();var J=["extend_token","login_with_user","login_silent_user","__sferum_invite_link","registration_with_phone","registration_with_email","validate_phone","bind_ok_account","no_password_flow"];function Z(e){return e&&J.includes(e.name)?btoa(JSON.stringify(e)):""}function ee(e,t){void 0===t&&(t="auth");var n=q.get(),r=n.appId,o=n.connectDomain,i=n.appSettings,a=H({app_id:r,response_type:"silent_token",v:"1.44.0"},e);return i&&C(i)&&(a.app_settings=S(i)),"https://"+o+"/"+t+"?"+w(a)}var te,ne=[0,1,3,4,6,15,16,82];!function(e){e.Default="default",e.NamePhone="name_phone",e.PhoneName="phone_name"}(te||(te={}));var re,oe=[te.Default,te.NamePhone,te.PhoneName];!function(e){e.Primary="primary",e.Flat="flat"}(re||(re={}));var ie,ae,se,ce,le,ue,de,_e=[re.Primary,re.Flat];!function(e){e.SHOW_DATA_POLICY="VKSDKOneTapAuthConnectDataPolicy",e.HIDE_DATA_POLICY="VKSDKOneTapAuthDataPolicyClose",e.DATA_POLICY_RESULT="VKSDKOneTapAuthDataPolicyResult",e.SHOW_CAPTCHA="VKSDKOneTapAuthDataPolicyShowCaptcha"}(ie||(ie={})),function(e){e.SHOW_POLICY_AGREEMENTS="VKSDKOneTapAuthPolicyAgreementsShow",e.HIDE_POLICY_AGREEMENTS="VKSDKOneTapAuthPolicyAgreementsHide",e.ACCEPT_POLICY_AGREEMENTS="VKSDKOneTapAuthPolicyAgreementsAccept",e.DECLINE_POLICY_AGREEMENTS="VKSDKOneTapAuthPolicyAgreementsDecline",e.POLICY_AGREEMENTS_ERROR="VKSDKOneTapAuthPolicyAgreementsError",e.SHOW_DATA_POLICY="VKSDKOneTapAuthPolicyAgreementsShowDataPolicy"}(ae||(ae={})),function(e){e.CAPTCHA_SUCCESS="VKSDKAuthCaptchaSuccess",e.CAPTCHA_FAIL="VKSDKAuthCaptchaFail"}(se||(se={})),function(e){e.PHONE_VALIDATION_NEEDED="VKSDKOneTapAuthPhoneValidationNeeded",e.FULL_AUTH_NEEDED="VKSDKOneTapAuthFullAuthNeeded",e.AUTH_DATA_LOADED="VKSDKOneTapAuthDataLoaded",e.NOT_AUTHORIZED="VKSDKOneTapAuthNotAuthorized",e.LOGIN_SUCCESS="VKSDKOneTapAuthLoginSuccess",e.RESIZE_FRAME="VKSDKOneTapResizeFrame",e.SHOW_CAPTCHA="VKSDKOneTapShowCaptcha",e.VALIDATE_CAPTCHA="VKSDKOneTapValidateCaptcha"}(ce||(ce={})),function(e){e.CLOSE_AUTH="VKSDKOneTapAuthClose",e.ADAPTIVITY_CHANGE="VKSDKFloatingOneTapAdaptivityChange",e.ADAPTIVITY_CHANGED="VKSDKFloatingOneTapAdaptivityChanged"}(le||(le={})),function(e){e.SHOW_LOGIN="VKSDKButtonOneTapAuthShowLogin",e.SHOW_LOGIN_OPTIONS="VKSDKButtonOneTapAuthShowLoginOptions",e.SHOW_AGREEMENTS_DIALOG="VKSDKButtonOneTapAuthShowAgreementsDialog",e.START_AUTHORIZE="VKSDKButtonOneTapAuthStartAuthorize"}(ue||(ue={})),function(e){e.WRONG_TOKEN="VKSDKBindAccountErrorWrongToken",e.ALREADY_BIND="VKSDKBindAccountErrorAlreadyBind"}(de||(de={}));var pe,he,fe=function(){function e(){}return e.flags=null,e.silentAuth=function(){var e=q.get(),t="https://"+e.loginDomain+"/?act=connect&app_id="+e.appId+"&response_type=silent_token&uuid="+Q()+"&v=1.44.0",n=new XMLHttpRequest;return n.open("GET",t,!0),n.responseType="json",n.withCredentials=!0,new Promise((function(e,t){n.onload=function(){n.response?e({provider:"vk",payload:n.response}):t()},n.onerror=function(){t()},n.send()}))},e.oneTapAuth=function(t,n){if(console.warn("Connect.oneTapAuth method is deprecated. Use Connect.floatingOneTapAuth and Connect.buttonOneTapAuth methods."),!["floating","button"].includes(t))return null;switch(t){case"button":return e.buttonOneTapAuth(n);case"floating":return e.floatingOneTapAuth(n);default:return null}},e.floatingOneTapAuth=function(t){var n=function(){var e,t=window.innerWidth,n=t<=768;return{destroy:function(){return window.removeEventListener("resize",e)},isAdaptive:function(){return n},observe:function(r){e=function(){var e=window.innerWidth;t>768&&e<=768?r(n=!0):t<=768&&e>768&&r(n=!1),t=e},window.addEventListener("resize",e)}}}(),r=function(e,t){var n,r,o,i={},a=e?"314px":"334px",s=e?"\n      display: none;\n      position: fixed;\n      bottom: 0;\n      right: 50%;\n      transform: translate(50%, 0);\n      max-width: 468px;\n      width: 100%;\n      height: "+a+";\n    ":"\n        display: none;\n        position: fixed;\n        top: 0;\n        right: 0;\n        max-width: 400px;\n        width: 100%;\n        height: "+a+";\n      ";return(null===(n=null==t?void 0:t.styles)||void 0===n?void 0:n.zIndex)&&isFinite(null===(r=null==t?void 0:t.styles)||void 0===r?void 0:r.zIndex)&&(s+="z-index: "+(null===(o=null==t?void 0:t.styles)||void 0===o?void 0:o.zIndex)+";"),t&&(i.skip_success=D(t.skipSuccess,0)),{pageUrl:"floating_one_tap_auth",pageUrlParams:H({adaptive:e?1:0},i),frameStyles:s}}(n.isAdaptive(),t.options);if(!r)throw new Error("options were not set");var o=Q(),i=T(ee(H({origin:location.protocol+"//"+location.host,uuid:o},r.pageUrlParams),r.pageUrl),{cssText:r.frameStyles}),a=new Y({iframe:i,origin:"https://"+q.get().connectDomain});n.observe((function(e){a.sendMessage({handler:le.ADAPTIVITY_CHANGE,params:{uuid:o,is_adaptive:e}}),e?(i.style.maxWidth="468px",i.style.top="auto",i.style.bottom="0",i.style.right="50%",i.style.transform="translate(50%, 0)"):(i.style.maxWidth="400px",i.style.top="0",i.style.bottom="auto",i.style.right="0",i.style.transform="none"),i.style.display="none"})),document.body.appendChild(i);var s=function(){a.sendMessage({handler:ce.RESIZE_FRAME,params:{uuid:o}})};window.addEventListener("resize",s);var c=function(){i&&(i.remove(),i=null),window.removeEventListener("resize",s),n&&n.destroy(),a.destroy()},l=new Promise((function(n){a.onMessage((function(r){if(r.params.uuid===o)switch(r.handler){case ce.NOT_AUTHORIZED:t.callback({type:r.handler,payload:{uuid:o,error:"not_authorized"}}),c(),n(r.handler);break;case ce.RESIZE_FRAME:i.style.height=r.params.height+"px";break;case le.CLOSE_AUTH:t.callback({type:r.handler,payload:{uuid:o}}),c();break;case le.ADAPTIVITY_CHANGED:i.style.display="block";break;case ce.AUTH_DATA_LOADED:i.style.display="block",n(r.handler);default:e.handleOneTapEvents(r,a,t)}}))}));return{getFrame:function(){return i},destroy:c,authReadyPromise:l}},e.buttonOneTapAuth=function(t){var n=function(e){var t,n,r,o,i,a,s={},c=44,l=56;return e&&(s.display=e.displayMode&&oe.includes(e.displayMode)?e.displayMode:te.Default,s.button_skin=e.buttonSkin&&_e.includes(e.buttonSkin)?e.buttonSkin:re.Primary,s.show_agreements=D(e.showAgreements,0),s.show_alternative_login=D(e.showAlternativeLogin,0),s.show_agreements_dialog=D(e.showAgreementsDialog,1),void 0!==(null===(t=e.buttonStyles)||void 0===t?void 0:t.height)&&(c=Number(null===(n=e.buttonStyles)||void 0===n?void 0:n.height),l=Number(null===(r=e.buttonStyles)||void 0===r?void 0:r.height)+12,s.style_height=null===(o=e.buttonStyles)||void 0===o?void 0:o.height),void 0!==(null===(i=e.buttonStyles)||void 0===i?void 0:i.borderRadius)&&(s.style_border_radius=null===(a=e.buttonStyles)||void 0===a?void 0:a.borderRadius),void 0!==e.langId&&(s.lang_id=ne.includes(e.langId)?e.langId:0),c+=s.show_alternative_login?l:0,c+=s.show_agreements?80:0),{pageUrl:"button_one_tap_auth",pageUrlParams:s,frameStyles:"\n        height: "+c+"px;\n      "}}(t.options);if(!n)throw new Error("options were not set");var r=Q(),o=T(ee(H({origin:location.protocol+"//"+location.host,uuid:r},n.pageUrlParams),n.pageUrl),{cssText:n.frameStyles}),i=t.container;i&&i.appendChild(o);var a=new Y({iframe:o,origin:"https://"+q.get().connectDomain}),s=function(){a.sendMessage({handler:ce.RESIZE_FRAME,params:{uuid:r}})};return window.addEventListener("resize",s),{getFrame:function(){return o},destroy:function(){o&&(o.remove(),o=null),window.removeEventListener("resize",s),a.destroy()},authReadyPromise:new Promise((function(n){a.onMessage((function(i){if(i.params.uuid===r)switch(i.handler){case ce.RESIZE_FRAME:o.style.height=i.params.height+"px";break;case ce.NOT_AUTHORIZED:n(i.handler);break;case ue.SHOW_LOGIN:case ue.SHOW_LOGIN_OPTIONS:t.callback({type:i.handler,payload:{uuid:r}});break;case ue.SHOW_AGREEMENTS_DIALOG:e.userPolicyAgreements(r).show().then((function(e){e&&e.accepted&&a.sendMessage({handler:ue.START_AUTHORIZE,params:{uuid:r}})})).catch((function(){a.sendMessage({handler:ae.DECLINE_POLICY_AGREEMENTS,params:{uuid:r}})}));break;case ce.AUTH_DATA_LOADED:n(i.handler);default:e.handleOneTapEvents(i,a,t)}}))}))}},e.handleOneTapEvents=function(t,n,r){var o=t.params.uuid;switch(t.handler){case ce.AUTH_DATA_LOADED:n.sendMessage({handler:ce.RESIZE_FRAME,params:{uuid:o}});break;case ce.LOGIN_SUCCESS:r.callback({type:t.handler,provider:"vk",payload:t.params});break;case ce.SHOW_CAPTCHA:var i=e.captcha(o,{captcha_sid:t.params.captcha_sid,captcha_img:t.params.captcha_img});i.show().then((function(e){n.sendMessage({handler:se.CAPTCHA_SUCCESS,params:H({uuid:o},e)})})).catch((function(){n.sendMessage({handler:se.CAPTCHA_FAIL,params:{uuid:o}}),i.destroy()}));break;case ie.SHOW_DATA_POLICY:e.userDataPolicy(o).show().then((function(){r.callback({type:ie.DATA_POLICY_RESULT,payload:{uuid:o,policyAccepted:!0}})})).catch((function(){r.callback({type:ie.DATA_POLICY_RESULT,payload:{uuid:o,policyAccepted:!1}})}));break;case ce.FULL_AUTH_NEEDED:case ce.PHONE_VALIDATION_NEEDED:r.callback({type:t.handler,payload:{uuid:o}})}},e.userDataPolicy=function(t){var n=ee({origin:location.protocol+"//"+location.host,uuid:t},"user_data_policy"),r=window.innerHeight,o=T(n,{properties:{height:r+"px"},cssText:"\n      display: none;\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: "+r+"px;\n      min-height: "+r+"px;\n      border: none;\n      z-index: 99999;\n    "});document.body.appendChild(o);var i=new Y({iframe:o,origin:"https://"+q.get().connectDomain}),a=function(){o.style.display="none"};return{show:function(){return o.style.display="block",new Promise((function(n,r){i.onMessage((function(s){switch(s.handler){case ie.HIDE_DATA_POLICY:a(),n(void 0);break;case ie.SHOW_CAPTCHA:var c=e.captcha(t,{captcha_sid:s.params.captcha_sid,captcha_img:s.params.captcha_img});c.show().then((function(e){i.sendMessage({handler:se.CAPTCHA_SUCCESS,params:H({uuid:t},e)}),o.style.display="block"})).catch((function(){i.sendMessage({handler:se.CAPTCHA_FAIL,params:{uuid:t}}),c.destroy()})),a();break;default:a(),r()}}))}))},hide:a,destroy:function(){document.body.removeChild(o),i.destroy()}}},e.userPolicyAgreements=function(t){var n,r=T(ee({origin:location.protocol+"//"+location.host,uuid:t},"user_policy_agreements"),{properties:{height:(n=window.innerHeight)+"px"},cssText:"\n      display: none;\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: "+n+"px;\n      min-height: "+n+"px;\n      border: none;\n      z-index: 99999;\n    "});document.body.appendChild(r);var o=new Y({iframe:r,origin:"https://"+q.get().connectDomain}),i=function(){r.style.display="none"};return{show:function(){return r.style.display="block",new Promise((function(n,a){o.onMessage((function(o){switch(o.handler){case ae.ACCEPT_POLICY_AGREEMENTS:i(),n({accepted:!0});break;case ae.DECLINE_POLICY_AGREEMENTS:i(),n({accepted:!1});break;case ae.SHOW_DATA_POLICY:i();var s=function(){r.style.display="block"};e.userDataPolicy(t).show().then(s).catch(s);break;case ae.POLICY_AGREEMENTS_ERROR:case ae.HIDE_POLICY_AGREEMENTS:default:i(),a()}}))}))},hide:i,destroy:function(){document.body.removeChild(r),o.destroy()}}},e.captcha=function(e,t){var n=ee(H({origin:location.protocol+"//"+location.host,uuid:e},t),"auth_captcha"),r=window.innerHeight,o=T(n,{cssText:"\n      display: none;\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: "+r+"px;\n      min-height: "+r+"px;\n      border: none;\n      z-index: 99999;\n    "});document.body.appendChild(o);var i=new Y({iframe:o,origin:"https://"+q.get().connectDomain}),a=function(){document.body.removeChild(o),i.destroy()};return{show:function(){return o.style.display="block",new Promise((function(e,t){i.onMessage((function(n){if(n.handler===se.CAPTCHA_SUCCESS)e(n.params),a();else t(),a()}))}))},destroy:a}},e.userVisibleAuth=function(t){var n=Q(),r=q.get(),o=H({origin:location.protocol+"//"+location.host,uuid:n,debug:D(r._debug,0),localhost:D(r._debug,0)},P(t,["screen","source"])),i=Z(null==t?void 0:t.action);i&&(o.action=i);var a=ee(o);e.flags&&(a=a+"#"+w(e.flags));var s=screen.height/2-280,c=screen.width/2-410,l=window.open(a,"_blank","top="+s+",left="+c+",width=820,height=560,location");if(!l){var u={code:k.CONNECT_WINDOW_NOT_OPENED,reason:"Connect window was not opened."};return Promise.reject(u)}return new Promise((function(e,t){var r=setInterval((function(){if(!l||l.closed){window.removeEventListener("message",o),clearInterval(r);var e={code:k.CONNECT_WINDOW_CLOSED,reason:"Connect window was closed."};t(e)}}),1e3);function o(i){if(i.source===l&&l)if(window.removeEventListener("message",o),clearInterval(r),".vk.com"===i.origin.slice(i.origin.length-".vk.com".length))if(i.data.action==="vk_connect_response"+n){var a=i.data.payload;l.close(),a.error?(c={code:k.CONNECT_CLIENT_SDK_ERROR,reason:W(a.error)},t(c)):e({provider:"vk",payload:a})}else if(i.data.action==="oauth_callback"+n)e({provider:i.data.payload.name}),l.close();else if(i.data.action==="skip_callback"+n){var s=i.data.payload.redirectURL;s&&(window.location.href=s),l.close()}else i.data.action==="bind_ok_account"+n?(e(i.data.payload),l.close()):(l.close(),c={code:k.CONNECT_UNKNOWN_SDK_MESSAGE,reason:F(JSON.stringify(i.data))},t(c));else{l.close();var c={code:k.CONNECT_DOMAIN_NOT_ALLOWED,reason:U(i.origin)};t(c)}}window.addEventListener("message",o)}))},e.redirectAuth=function(e){var t=Q(),n=H({redirect_uri:e.url,uuid:t},P(e,["screen","source"])),r=Z(null==e?void 0:e.action);r&&(n.action=r),(null==e?void 0:e.state)&&(n.redirect_state=e.state);var o=ee(n);location.assign(o)},e.logout=function(){var e=q.get(),t=e.connectDomain,n=e.appId,r=e.superAppTokenV2;if(!r)return Promise.reject(B("superappToken","SuperappToken is undefined"));var o=w({origin:location.protocol+"//"+location.host,host_app_id:n,superapp_token:r}),i=fetch("https://"+t+"/logout?"+o,{credentials:"include"});return q.events.emit(O.LOGOUT),q.setSuperAppToken(""),q.setSuperAppToken("",{version:2}),i},e}(),me=["open_account"];!function(){function e(){}e.open=function(e){var t,n=Q(),r=q.get(),o=H({origin:location.protocol+"//"+location.host,uuid:n,debug:D(r._debug,0),localhost:D(r._localhost,0)},P(e,["screen","source"])),i=(t=null==e?void 0:e.action)&&me.includes(t.name)?btoa(JSON.stringify(t)):"";i&&(o.action=i);var a=function(e){var t=q.get(),n=t.appId,r=t.connectDomain,o=t.appSettings,i=H({app_id:n,response_type:"silent_token",v:"1.44.0"},e);return o&&C(o)&&(i.app_settings=S(o)),"https://"+r+"/open_account?"+w(i)}(o);if(!window.open(a,"_blank")){var s={code:k.CONNECT_WINDOW_NOT_OPENED,reason:"Connect window was not opened."};return Promise.reject(s)}return Promise.resolve()}}();!function(e){e.INTERNAL_RESIZE="VKSDKMessengerInternalResize",e.INTERNAL_LOGOUT="VKSDKMessengerInternalLogout"}(pe||(pe={})),function(e){e.CLOSE_CHAT="VKSDKMessengerCloseChat"}(he||(he={}));var ve=function(){function e(){var e=this;this.resolve=function(t){if(Boolean(e.promise))return e.finished=!0,e.active=!1,e.resolveHandler(t)},this.reject=function(t){if(Boolean(e.promise))return e.finished=!0,e.active=!1,e.rejectHandler(t)}}return e.prototype.start=function(){var e=this;this.active=!0,this.finished=!1,this.promise=new Promise((function(t,n){e.resolveHandler=t,e.rejectHandler=n}))},e.prototype.get=function(){return this.promise},e}(),ge=function(){function e(){}return e.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e}(),ye=function(){function e(){var e=this;this.config={},this.params={},this.loadingTask=new ve,this.initTask=new ve,this.cssText="",this.handleError=function(t){var n={data:t,code:k.CUSTOM};e.events.emit(O.ERROR,n)},this.events=j(),this.handleBridgeMessage=this.handleBridgeMessage.bind(this),this.handleChangeSuperAppToken=this.handleChangeSuperAppToken.bind(this),this.close=this.close.bind(this),this.handleLogout=this.handleLogout.bind(this)}return e.prototype.preload=function(e){var t=this;return this.validateParams(e).then((function(){return t.updateParams(e),t.createIframe(),t.initTask.start(),t.loadingTask.start(),t.timeoutTimer=setTimeout((function(){if(!t.initTask.finished){var e={code:k.LOADING_ERROR,reason:"Loading timeout"};t.initTask.reject(e)}}),5e3),t.iframe.onload=function(){t.iframe.onload=null,t.loadingTask.resolve()},t.bridge=new Y({iframe:t.iframe,origin:"https://"+q.get().connectDomain}),t.bridge.onMessage(t.handleBridgeMessage),q.events.on(N.SUPERAPP_TOKEN_CHANGE_V2,t.handleChangeSuperAppToken),q.events.on(O.LOGOUT,t.close),window.document.body.appendChild(t.iframe),t.loadingTask.get()}))},e.prototype.open=function(e){var t=this;return this.validateParams(e).then((function(){return t.initTask.finished?(t.updateParams(e),Promise.resolve()):t.initTask.active||t.initTask.finished?(t.updateParams(e),t.initTask.get()):t.preload(e).then((function(){return t.initTask.get()}))}))},e.prototype.update=function(e,t){e&&this.updateParams(e),t&&this.updateConfig(t)},e.prototype.close=function(){this.iframe&&this.iframe.remove(),this.bridge&&this.bridge.destroy(),q.events.off(N.SUPERAPP_TOKEN_CHANGE_V2,this.handleChangeSuperAppToken),q.events.off(O.LOGOUT,this.close),delete this.iframe,delete this.bridge,this.loadingTask=new ve,this.initTask=new ve,this.events.emit(O.CLOSE)},e.prototype.sendMessage=function(e){this.bridge.sendMessage(e)},e.prototype.on=function(e,t){this.events.on(e,t)},e.prototype.off=function(e,t){this.events.off(e,t)},e.prototype.handleInit=function(){this.initTask.finished||(clearTimeout(this.timeoutTimer),this.initTask.resolve()),this.sendUpdateParamsMessage(),this.iframe.style.display="block"},e.prototype.handleRequestAuth=function(){q._auth({version:2})},e.prototype.handleRequestSuperAppToken=function(e){q._requestSuperAppToken(e,{version:2})},e.prototype.handleChangeSuperAppToken=function(e){this.bridge.sendMessage({handler:O.REQUEST_SUPERAPP_TOKEN+"Success",params:{result:e}})},e.prototype.handleBridgeMessage=function(e){switch(ge.log(e),e.handler){case I.INIT:this.handleInit();break;case O.REQUEST_SUPERAPP_TOKEN:this.handleRequestSuperAppToken(e.params);break;case O.AUTH_NEEDED:this.handleRequestAuth();break;case O.CLOSE:this.close();break;case O.ERROR:this.handleError(e.params);break;default:return}},e.prototype.handleLogout=function(){q._logout()},e.prototype.handleAfterUpdateParams=function(){this.sendUpdateParamsMessage()},e.prototype.handleAfterUpdateConfig=function(){},e.prototype.handleAfterCreateIframe=function(){},e.prototype.validateParams=function(e){return Promise.resolve(e)},e.prototype.createIframe=function(){var e=this.getIframeUrl();this.iframe=T(e,{cssText:this.cssText}),this.handleAfterCreateIframe()},e.prototype.getIframeUrl=function(){return""},e.prototype.getIframeUrlParams=function(){var e=q.get(),t=e._debug,n=e.superAppTokenV2,r=e.appId;return w(H(H({},this.params),{host_app_id:r,superapp_token:n,debug:D(t,0),localhost:D(t,0),origin:location.protocol+"//"+location.host}))},e.prototype.updateConfig=function(e){this.config=A(this.config,e),this.handleAfterUpdateConfig()},e.prototype.updateParams=function(e){this.params=A(this.params,e||{}),this.handleAfterUpdateParams()},e.prototype.sendUpdateParamsMessage=function(){this.bridge&&this.initTask.finished&&this.bridge.sendMessage({params:this.params,handler:O.UPDATE_PARAMS})},e}(),Ee={styles:{bottom:"0",right:"0",zIndex:99999}},we=function(e){function t(t){var n=e.call(this)||this;return n.config=Ee,n.cssText="\n    border: none;\n    display: none;\n    position: fixed;\n  ",n.updateStyles=function(){if(n.iframe){var e=n.config.styles,t=isFinite(e.zIndex)?e.zIndex:999999;n.iframe.style.zIndex=""+t,n.iframe.style.bottom=e.bottom,n.iframe.style.right=e.right}},n.createCaptcha=function(e,t){var n=ee(H({origin:location.protocol+"//"+location.host,uuid:e},t),"auth_captcha"),r=window.innerHeight,o=T(n,{cssText:"\n      display: none;\n      position: fixed;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: "+r+"px;\n      min-height: "+r+"px;\n      border: none;\n      z-index: 99999;\n    "});document.body.appendChild(o);var i=new Y({iframe:o,origin:"https://"+q.get().connectDomain}),a=function(){document.body.removeChild(o),i.destroy()};return{show:function(){return o.style.display="block",new Promise((function(e,t){i.onMessage((function(n){if(n.handler===se.CAPTCHA_SUCCESS)e(n.params),a();else t(),a()}))}))},destroy:a}},n.updateConfig(t),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.handleBridgeMessage=function(t){var n=this;switch(e.prototype.handleBridgeMessage.call(this,t),t.handler){case O.GET_CAPTCHA:var r=t.params.uuid,o=this.createCaptcha(r,{captcha_sid:t.params.captcha_sid,captcha_img:t.params.captcha_img});o.show().then((function(e){n.bridge.sendMessage({handler:O.GET_CAPTCHA+"Success",params:H({uuid:r},e)})})).catch((function(){n.bridge.sendMessage({handler:O.GET_CAPTCHA+"Fail",params:{uuid:r}}),o.destroy()}));break;case pe.INTERNAL_RESIZE:this.handleInternalIframeResize(t);break;case pe.INTERNAL_LOGOUT:this.handleLogout();break;case he.CLOSE_CHAT:this.events.emit(he.CLOSE_CHAT,t.params);break;default:return}},t.prototype.handleInternalIframeResize=function(e){var t=e.params;this.iframe.width=t.width+"px",this.iframe.height=t.height+"px"},t.prototype.handleAfterUpdateConfig=function(){this.updateStyles()},t.prototype.handleAfterCreateIframe=function(){this.updateStyles()},t.prototype.validateParams=function(e){return e.peer_id>=0?Promise.reject(B("peer_id","Peer id can`t be positive")):Promise.resolve(e)},t.prototype.getIframeUrl=function(){return"https://"+q.get().connectDomain+"/messenger?"+this.getIframeUrlParams()},t}(ye)},363476:function(e,t){!function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function n(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function r(e,n){var r,o,i=(r={current:0,next:function(){return++this.current}},o={},{add:function(e,t){var n=null!=t?t:r.next();return o[n]=e,n},resolve:function(e,t,n){var r=o[e];r&&(n(t)?r.resolve(t):r.reject(t),o[e]=null)}});return n((function(e){if(e.detail&&e.detail.data&&"request_id"in e.detail.data){var t=e.detail.data,n=t.request_id,r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["request_id"]);n&&i.resolve(n,r,(function(e){return!("error_type"in e)}))}})),function(n,r){return void 0===r&&(r={}),new Promise((function(o,a){var s=i.add({resolve:o,reject:a},r.request_id);e(n,t(t({},r),{request_id:s}))}))}}var o="undefined"!=typeof window,i=Boolean(o&&window.AndroidBridge),a=Boolean(o&&window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.VKWebAppClose),s=o&&!i&&!a,c=s&&/(^\?|&)vk_platform=mobile_web(&|$)/.test(location.search),l=s?"message":"VKWebAppEvent",u=n(["VKWebAppInit","VKWebAppGetCommunityAuthToken","VKWebAppAddToCommunity","VKWebAppGetUserInfo","VKWebAppSetLocation","VKWebAppGetClientVersion","VKWebAppGetPhoneNumber","VKWebAppGetEmail","VKWebAppGetGeodata","VKWebAppSetTitle","VKWebAppGetAuthToken","VKWebAppCallAPIMethod","VKWebAppJoinGroup","VKWebAppLeaveGroup","VKWebAppAllowMessagesFromGroup","VKWebAppDenyNotifications","VKWebAppAllowNotifications","VKWebAppOpenPayForm","VKWebAppOpenApp","VKWebAppShare","VKWebAppShowWallPostBox","VKWebAppScroll","VKWebAppShowOrderBox","VKWebAppShowLeaderBoardBox","VKWebAppShowInviteBox","VKWebAppShowRequestBox","VKWebAppAddToFavorites","VKWebAppShowCommunityWidgetPreviewBox","VKWebAppShowStoryBox","VKWebAppStorageGet","VKWebAppStorageGetKeys","VKWebAppStorageSet"],s&&!c?["VKWebAppResizeWindow","VKWebAppAddToMenu","VkWebAppShowSubscriptionBox","VkWebAppShowInstallPushBox"]:[]),d=o?window.AndroidBridge:void 0,_=a?window.webkit.messageHandlers:void 0;function p(e,t){var n=t||{bubbles:!1,cancelable:!1,detail:void 0},r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!!n.bubbles,!!n.cancelable,n.detail),r}"undefined"==typeof window||window.CustomEvent||(window.CustomEvent=(p.prototype=Event.prototype,p));var h=function(e){var t=void 0,o=[];function c(e){o.push(e)}"undefined"!=typeof window&&"addEventListener"in window&&window.addEventListener(l,(function(e){if(a||i)return n(o).map((function(t){return t.call(null,e)}));if(s&&e&&e.data){var r=e.data,c=r.type,l=r.data,u=r.frameId;c&&"VKWebAppSettings"===c?t=u:n(o).map((function(e){return e({detail:{type:c,data:l}})}))}}));var p=r((function(n,r){d&&d[n]?d[n](JSON.stringify(r)):_&&_[n]&&"function"==typeof _[n].postMessage?_[n].postMessage(r):s&&parent.postMessage({handler:n,params:r,type:"vk-connect",webFrameId:t,connectVersion:e},"*")}),c);return{send:p,sendPromise:p,subscribe:c,unsubscribe:function(e){var t=o.indexOf(e);-1<t&&o.splice(t,1)},supports:function(e){return i?!(!d||"function"!=typeof d[e]):a?!(!_||!_[e]||"function"!=typeof _[e].postMessage):s&&-1<u.indexOf(e)},isWebView:function(){return a||i}}}("2.2.3");e.applyMiddleware=function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.includes(void 0)||n.includes(null)?e.apply(void 0,n.filter((function(e){return"function"==typeof e}))):function(e){if(0===n.length)return e;var r,o={subscribe:e.subscribe,send:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.send.apply(e,t)}};return r=n.filter((function(e){return"function"==typeof e})).map((function(e){return e(o)})).reduce((function(e,t){return function(n){return e(t(n))}}))(e.send),t(t({},e),{send:r})}},e.default=h,Object.defineProperty(e,"__esModule",{value:!0})}(t)},376624:function(e){e.exports=function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},e.apply(this,arguments)},t=1,n=7,r=96*t,o=96*t,i=25,a=function(e,t,r,o,a){if(e<n&&t<n)return!1;if(e>=r-n&&t<n)return!1;if(e<n&&t>=r-n)return!1;if(a){var s=n+2;r<=i&&s--;var c=(r-2*n-s)/2-1;return r<=i&&c++,!(e>n+c&&e<r-n-c-1&&t>n+c&&t<r-n-c-1)&&0<=e&&e<r&&0<=t&&t<r&&o[t][e]}return o[t]&&o[t][e]},s=function(e,t,n,r,o){return void 0===o&&(o=!0),{l:a(e-1,t,n,r,o),r:a(e+1,t,n,r,o),t:a(e,t-1,n,r,o),b:a(e,t+1,n,r,o),current:a(e,t,n,r,o)}},c=function(e,c){if("number"!=typeof c.qrSize)throw new Error("Size should be a number");if("string"!=typeof c.className)throw new Error("Classname should be a string");for(var l=2*t,u=12.7*t,d=12.8*t,_=14.7*t,p=14.8*t,h=15.9*t,f=28.6*t,m=30.5*t,v=84.7776815*t,g=87.3*t,y=71.4*t,E=42.9*t,w=87.2*t,b=85.2*t,C=85.3*t,S=69.5*t,T=98*t,A=100*t,D=[],P=0,O=0,I=0,k=0,R=0;R<e.size;R++){P=0;for(var M=0;M<e.size;M++){I=M+P,P+=r,k=R+O;var L=s(M,R,e.size,e.modules,c.isShowLogo),x="",N="";L.current?(N=!(N=N||L.l||L.r||L.t||L.b?"":"empty")&&L.l&&L.r||L.t&&L.b?"rect":"")||(N+=L.l?"l":L.r?"r":"",(N+=L.t?"t":L.b?"b":"")||(N="empty")):N=!(N=!(N=!(N=!N&&L.l&&L.t&&a(M-1,R-1,e.size,e.modules,c.isShowLogo)?"n_lt":"")&&L.l&&L.b&&a(M-1,R+1,e.size,e.modules,c.isShowLogo)?"n_lb":"")&&L.r&&L.t&&a(M+1,R-1,e.size,e.modules,c.isShowLogo)?"n_rt":"")&&L.r&&L.b&&a(M+1,R+1,e.size,e.modules,c.isShowLogo)?"n_rb":"",N&&(x='<use xlink:href="#'+N+"-"+c.suffix+'"/>',D.push('<g transform="translate('+I+","+k+')">'+x+"</g>"))}O+=r}var B="",U=(e.size-3*n)/2*r+r*n-10;e.size<=i&&(B="scale(0.85)",U+=50);var F=(e.size-n)*o;D.push('<use fill-rule="evenodd" transform="translate(0,0)" xlink:href="#point-'+c.suffix+'"/>'),D.push('<use fill-rule="evenodd" transform="translate('+F+',0)" xlink:href="#point-'+c.suffix+'"/>'),D.push('<use fill-rule="evenodd" transform="translate(0,'+F+')" xlink:href="#point-'+c.suffix+'"/>'),c.isShowLogo&&(c.logoData?D.push('\n        <image\n          preserveAspectRatio="xMidYMid slice" clip-path="url(#logo-mask-'+c.suffix+')"\n          style="width: 750px; height: 750px;" width="750" height="750"\n          transform="translate('+U+","+U+") "+B+'"\n          xlink:href="'+c.logoData+'"\n        />\n      '):D.push('\n        <use style="width: 750px; height: 750px;" width="750" height="750"\n          fill="none"\n          fill-rule="evenodd"\n          transform="translate('+U+","+U+") "+B+'" xlink:href="#vk_logo-'+c.suffix+'"\n        />\n      '));var W=99*e.size,V="",H="translate(0,0)";if(c.isShowBackground){var j=(c.qrSize-40)/c.qrSize,K=W/c.qrSize*21;V='\n      <rect\n        x="0"\n        width="'+W+'"\n        height="'+W+'"\n        rx="'+Math.ceil(W/(c.qrSize/36))+'"\n        fill="'+c.backgroundColor+'"\n      />',H="translate("+K+", "+K+") scale("+j+")"}var z="M0,0 L66,0 C"+v+",-3.44940413e-15 "+A+",15.2223185 "+A+",34 L"+A+",66 C"+A+","+v+" "+v+","+A+" 66,"+A+" L0,"+A+" L0,0 Z",G="M0,0 L"+A+",0 L"+A+",66 C"+A+","+v+" "+v+","+A+" 66,"+A+" L0,"+A+" L0,0 Z";return'\n  <svg\n    version="1.1"\n    viewBox="0 0 '+W+" "+W+'"\n    width="'+c.qrSize+'px"\n    height="'+c.qrSize+'px"\n    '+(c.className?'class="'+c.className+'"':"")+'\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"\n  >\n    <defs>\n      <rect id="rect-'+c.suffix+'" width="100" height="100" fill="'+c.foregroundColor+'"/>\n      <path\n        id="empty-'+c.suffix+'"\n        d="M0,'+f+"v"+E+"C0,"+g+","+d+","+A+","+f+","+A+"h"+E+"c"+h+",0,"+f+"-"+d+","+f+"-"+f+"V"+f+"C"+A+","+u+","+w+",0,"+y+",0H"+f+" C"+d+",0,0,"+d+",0,"+f+'z"\n        fill="'+c.foregroundColor+'"\n      />\n      <path id="b-'+c.suffix+'" d="'+z+'" transform="rotate(-90 50 50)" fill="'+c.foregroundColor+'"/>\n      <path id="r-'+c.suffix+'" d="'+z+'" transform="rotate(-180 50 50)" fill="'+c.foregroundColor+'"/>\n      <path id="l-'+c.suffix+'" d="'+z+'" fill="'+c.foregroundColor+'"/>\n      <path id="t-'+c.suffix+'" d="'+z+'" transform="rotate(90 50 50)" fill="'+c.foregroundColor+'"/>\n      <path id="l-'+c.suffix+'" d="'+G+'" transform="rotate(-90 50 50)" fill="'+c.foregroundColor+'"/>\n      <path id="lt-'+c.suffix+'" d="'+G+'" fill="'+c.foregroundColor+'"/>\n      <path id="lb-'+c.suffix+'" d="'+G+'" transform="rotate(-90 50 50)" fill="'+c.foregroundColor+'"/>\n      <path id="rb-'+c.suffix+'" d="'+G+'" transform="rotate(-180 50 50)" fill="'+c.foregroundColor+'"/>\n      <path id="rt-'+c.suffix+'" d="'+G+'" transform="rotate(90 50 50)" fill="'+c.foregroundColor+'"/>\n      <path\n        id="n_lt-'+c.suffix+'"\n        d="M'+m+","+l+"V0H0v"+m+"h"+l+"C"+l+","+_+","+p+","+l+","+m+","+l+'z"\n        fill="'+c.foregroundColor+'"\n      />\n      <path\n        id="n_lb-'+c.suffix+'"\n        d="M'+l+","+S+"H0V"+A+"h"+m+"v-"+l+"C"+_+","+T+","+l+","+b+","+l+","+S+'z"\n        fill="'+c.foregroundColor+'"\n      />\n      <path\n        id="n_rt-'+c.suffix+'"\n        d="M'+T+","+m+"h"+l+"V0H"+S+"v"+l+"C"+C+","+l+","+T+","+p+","+T+","+m+'z"\n        fill="'+c.foregroundColor+'"\n      />\n      <path id="n_rb-'+c.suffix+'"\n        d="M'+S+","+T+"v"+l+"H"+A+"V"+S+"h-"+l+"C"+T+","+C+","+b+","+T+","+S+","+T+'z"\n        fill="'+c.foregroundColor+'"\n      />\n      <path\n        id="point-'+c.suffix+'"\n        fill="'+c.foregroundColor+'"\n        d="M600.001786,457.329333 L600.001786,242.658167 C600.001786,147.372368 587.039517,124.122784 581.464617,118.535383 C575.877216,112.960483 552.627632,99.9982143 457.329333,99.9982143 L242.670667,99.9982143 C147.372368,99.9982143 124.122784,112.960483 118.547883,118.535383 C112.972983,124.122784 99.9982143,147.372368 99.9982143,242.658167 L99.9982143,457.329333 C99.9982143,552.627632 112.972983,575.877216 118.547883,581.464617 C124.122784,587.027017 147.372368,600.001786 242.670667,600.001786 L457.329333,600.001786 C552.627632,600.001786 575.877216,587.027017 581.464617,581.464617 C587.039517,575.877216 600.001786,552.627632 600.001786,457.329333 Z M457.329333,0 C653.338333,0 700,46.6616668 700,242.658167 C700,438.667167 700,261.332833 700,457.329333 C700,653.338333 653.338333,700 457.329333,700 C261.332833,700 438.667167,700 242.670667,700 C46.6616668,700 0,653.338333 0,457.329333 C0,261.332833 0,352.118712 0,242.658167 C0,46.6616668 46.6616668,0 242.670667,0 C438.667167,0 261.332833,0 457.329333,0 Z M395.996667,200 C480.004166,200 500,220.008332 500,303.990835 C500,387.998334 500,312.001666 500,395.996667 C500,479.991668 480.004166,500 395.996667,500 C312.001666,500 387.998334,500 304.003333,500 C220.008332,500 200,479.991668 200,395.996667 C200,312.001666 200,350.906061 200,303.990835 C200,220.008332 220.008332,200 304.003333,200 C387.998334,200 312.001666,200 395.996667,200 Z"\n      />\n      <g id="vk_logo-'+c.suffix+'">\n        <path\n          fill="'+c.logoColor+'"\n          d="M83.3334 363.333C83.3334 231.34 83.3334 165.343 124.338 124.338C165.343 83.3333 231.34              83.3333 363.333 83.3333H386.667C518.66 83.3333 584.657 83.3333 625.662 124.338C666.667 165.343              666.667 231.34 666.667 363.333V386.667C666.667 518.66 666.667 584.657 625.662 625.662C584.657              666.667 518.66 666.667 386.667 666.667H363.333C231.34 666.667 165.343 666.667 124.338 625.662C83.3334              584.657 83.3334 518.66 83.3334 386.667V363.333Z"\n        />\n        <path\n          fill="#FFF"\n          d="M394.907 508.681C263.293 508.681 183.442 417.365 180.313 265.625H246.972C249.05 377.09              299.763 424.323 338.638 434.036V265.625H402.519V361.82C440.016 357.664 479.264 313.909              492.456 265.625H555.333C545.27 325 502.543 368.754 472.353 386.803C502.566 401.395 551.177              439.593 569.926 508.681H500.815C486.222 462.498 450.476 426.728 402.542 421.872V508.681H394.907Z"\n        />\n      </g>\n      <clipPath id="logo-mask-'+c.suffix+'">\n        <rect x="0" y="0" width="750" height="750" />\n      </clipPath>\n    </defs>\n\n    '+V+'\n\n    <g transform="'+H+'">\n      '+D.join("\n")+"\n    </g>\n  </svg>"},l=function(){function e(t,n,r,o){if(this.version=t,this.errorCorrectionLevel=n,this.mask=o,this.modules=[],this.isFunction=[],t<e.MIN_VERSION||t>e.MAX_VERSION)throw"Version value out of range";if(o<-1||o>7)throw"Mask value out of range";this.size=4*t+17;for(var i=[],a=0;a<this.size;a++)i.push(!1);for(a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();var s=this.addEccAndInterleave(r);if(this.drawCodewords(s),-1==o){var c=1e9;for(a=0;a<8;a++){this.applyMask(a),this.drawFormatBits(a);var l=this.getPenaltyScore();l<c&&(o=a,c=l),this.applyMask(a)}}if(o<0||o>7)throw"Assertion error";this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}return e.encodeText=function(t,n){var r=d.makeSegments(t);return e.encodeSegments(r,n)},e.encodeBinary=function(t,n){var r=d.makeBytes(t);return e.encodeSegments([r],n)},e.encodeSegments=function(t,n,r,o,i,a){if(void 0===r&&(r=1),void 0===o&&(o=40),void 0===i&&(i=-1),void 0===a&&(a=!0),!(e.MIN_VERSION<=r&&r<=o&&o<=e.MAX_VERSION)||i<-1||i>7)throw"Invalid value";var s,c;for(s=r;;s++){var l=8*e.getNumDataCodewords(s,n),u=d.getTotalBits(t,s);if(u<=l){c=u;break}if(s>=o)throw"Data too long"}for(var _=0,h=[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH];_<h.length;_++){var f=h[_];a&&c<=8*e.getNumDataCodewords(s,f)&&(n=f)}for(var m=new p,v=0,g=t;v<g.length;v++){var y=g[v];m.appendBits(y.mode.modeBits,4),m.appendBits(y.numChars,y.mode.numCharCountBits(s));for(var E=0,w=y.getData();E<w.length;E++){var b=w[E];m.array.push(b)}}if(m.array.length!=c)throw"Assertion error";var C=8*e.getNumDataCodewords(s,n);if(m.array.length>C)throw"Assertion error";if(m.appendBits(0,Math.min(4,C-m.array.length)),m.appendBits(0,(8-m.array.length%8)%8),m.array.length%8!=0)throw"Assertion error";for(var S=236;m.array.length<C;S^=253)m.appendBits(S,8);for(var T=[];8*T.length<m.array.length;)T.push(0);return m.array.forEach((function(e,t){return T[t>>>3]|=e<<7-(7&t)})),new e(s,n,T,i)},e.prototype.getModule=function(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]},e.prototype.drawCanvas=function(e,t,n){if(e<=0||t<0)throw"Value out of range";var r=(this.size+2*t)*e;n.width=r,n.height=r;for(var o=n.getContext("2d"),i=-t;i<this.size+t;i++)for(var a=-t;a<this.size+t;a++)o.fillStyle=this.getModule(a,i)?"#000000":"#FFFFFF",o.fillRect((a+t)*e,(i+t)*e,e,e)},e.prototype.toSvgString=function(e){if(e<0)throw"Border must be non-negative";for(var t=[],n=0;n<this.size;n++)for(var r=0;r<this.size;r++)this.getModule(r,n)&&t.push("M"+(r+e)+","+(n+e)+"h1v1h-1z");return'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+(this.size+2*e)+" "+(this.size+2*e)+'" stroke="none">\n\t<rect width="100%" height="100%" fill="#FFFFFF"/>\n\t<path d="'+t.join(" ")+'" fill="#000000"/>\n</svg>\n'},e.prototype.drawFunctionPatterns=function(){for(var e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);var t=this.getAlignmentPatternPositions(),n=t.length;for(e=0;e<n;e++)for(var r=0;r<n;r++)0==e&&0==r||0==e&&r==n-1||e==n-1&&0==r||this.drawAlignmentPattern(t[e],t[r]);this.drawFormatBits(0),this.drawVersion()},e.prototype.drawFormatBits=function(e){for(var t=this.errorCorrectionLevel.formatBits<<3|e,n=t,r=0;r<10;r++)n=n<<1^1335*(n>>>9);var o=21522^(t<<10|n);if(o>>>15!=0)throw"Assertion error";for(r=0;r<=5;r++)this.setFunctionModule(8,r,u(o,r));for(this.setFunctionModule(8,7,u(o,6)),this.setFunctionModule(8,8,u(o,7)),this.setFunctionModule(7,8,u(o,8)),r=9;r<15;r++)this.setFunctionModule(14-r,8,u(o,r));for(r=0;r<8;r++)this.setFunctionModule(this.size-1-r,8,u(o,r));for(r=8;r<15;r++)this.setFunctionModule(8,this.size-15+r,u(o,r));this.setFunctionModule(8,this.size-8,!0)},e.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^7973*(e>>>11);var n=this.version<<12|e;if(n>>>18!=0)throw"Assertion error";for(t=0;t<18;t++){var r=u(n,t),o=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(o,i,r),this.setFunctionModule(i,o,r)}}},e.prototype.drawFinderPattern=function(e,t){for(var n=-4;n<=4;n++)for(var r=-4;r<=4;r++){var o=Math.max(Math.abs(r),Math.abs(n)),i=e+r,a=t+n;0<=i&&i<this.size&&0<=a&&a<this.size&&this.setFunctionModule(i,a,2!=o&&4!=o)}},e.prototype.drawAlignmentPattern=function(e,t){for(var n=-2;n<=2;n++)for(var r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))},e.prototype.setFunctionModule=function(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0},e.prototype.addEccAndInterleave=function(t){var n=this.version,r=this.errorCorrectionLevel;if(t.length!=e.getNumDataCodewords(n,r))throw"Invalid argument";for(var o=e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],i=e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],a=Math.floor(e.getNumRawDataModules(n)/8),s=o-a%o,c=Math.floor(a/o),l=[],u=new _(i),d=0,p=0;d<o;d++){var h=t.slice(p,p+c-i+(d<s?0:1));p+=h.length;var f=u.getRemainder(h);d<s&&h.push(0),l.push(h.concat(f))}var m=[];for(d=0;d<l[0].length;d++)for(var v=0;v<l.length;v++)(d!=c-i||v>=s)&&m.push(l[v][d]);if(m.length!=a)throw"Assertion error";return m},e.prototype.drawCodewords=function(t){if(t.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw"Invalid argument";for(var n=0,r=this.size-1;r>=1;r-=2){6==r&&(r=5);for(var o=0;o<this.size;o++)for(var i=0;i<2;i++){var a=r-i,s=0==(r+1&2)?this.size-1-o:o;!this.isFunction[s][a]&&n<8*t.length&&(this.modules[s][a]=u(t[n>>>3],7-(7&n)),n++)}}if(n!=8*t.length)throw"Assertion error"},e.prototype.applyMask=function(e){if(e<0||e>7)throw"Mask value out of range";for(var t=0;t<this.size;t++)for(var n=0;n<this.size;n++){var r=void 0;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw"Assertion error"}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}},e.prototype.getPenaltyScore=function(){for(var t=0,n=0;n<this.size;n++){for(var r=[0,0,0,0,0,0,0],o=!1,i=0,a=0;a<this.size;a++)this.modules[n][a]==o?5==++i?t+=e.PENALTY_N1:i>5&&t++:(e.addRunToHistory(i,r),!o&&e.hasFinderLikePattern(r)&&(t+=e.PENALTY_N3),o=this.modules[n][a],i=1);e.addRunToHistory(i,r),o&&e.addRunToHistory(0,r),e.hasFinderLikePattern(r)&&(t+=e.PENALTY_N3)}for(a=0;a<this.size;a++){r=[0,0,0,0,0,0,0],o=!1;var s=0;for(n=0;n<this.size;n++)this.modules[n][a]==o?5==++s?t+=e.PENALTY_N1:s>5&&t++:(e.addRunToHistory(s,r),!o&&e.hasFinderLikePattern(r)&&(t+=e.PENALTY_N3),o=this.modules[n][a],s=1);e.addRunToHistory(s,r),o&&e.addRunToHistory(0,r),e.hasFinderLikePattern(r)&&(t+=e.PENALTY_N3)}for(n=0;n<this.size-1;n++)for(a=0;a<this.size-1;a++)(o=this.modules[n][a])==this.modules[n][a+1]&&o==this.modules[n+1][a]&&o==this.modules[n+1][a+1]&&(t+=e.PENALTY_N2);for(var c=0,l=0,u=this.modules;l<u.length;l++)for(var d=0,_=u[l];d<_.length;d++)(o=_[d])&&c++;var p=this.size*this.size;return t+=(Math.ceil(Math.abs(20*c-10*p)/p)-1)*e.PENALTY_N4},e.prototype.getAlignmentPatternPositions=function(){if(1==this.version)return[];for(var e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((this.size-13)/(2*e-2)),n=[6],r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n},e.getNumRawDataModules=function(t){if(t<e.MIN_VERSION||t>e.MAX_VERSION)throw"Version number out of range";var n=(16*t+128)*t+64;if(t>=2){var r=Math.floor(t/7)+2;n-=(25*r-10)*r-55,t>=7&&(n-=36)}return n},e.getNumDataCodewords=function(t,n){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]},e.addRunToHistory=function(e,t){t.pop(),t.unshift(e)},e.hasFinderLikePattern=function(e){var t=e[1];return t>0&&e[2]==t&&e[4]==t&&e[5]==t&&e[3]==3*t&&Math.max(e[0],e[6])>=4*t},e.MIN_VERSION=1,e.MAX_VERSION=40,e.PENALTY_N1=3,e.PENALTY_N2=3,e.PENALTY_N3=40,e.PENALTY_N4=10,e.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],e.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e}();function u(e,t){return 0!=(e>>>t&1)}var d=function(){function e(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw"Invalid argument";this.bitData=n.slice()}return e.makeBytes=function(t){for(var n=new p,r=0,o=t;r<o.length;r++){var i=o[r];n.appendBits(i,8)}return new e(e.Mode.BYTE,t.length,n.array)},e.makeNumeric=function(t){if(!this.NUMERIC_REGEX.test(t))throw"String contains non-numeric characters";for(var n=new p,r=0;r<t.length;){var o=Math.min(t.length-r,3);n.appendBits(parseInt(t.substr(r,o),10),3*o+1),r+=o}return new e(e.Mode.NUMERIC,t.length,n.array)},e.makeAlphanumeric=function(t){if(!this.ALPHANUMERIC_REGEX.test(t))throw"String contains unencodable characters in alphanumeric mode";var n,r=new p;for(n=0;n+2<=t.length;n+=2){var o=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));o+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),r.appendBits(o,11)}return n<t.length&&r.appendBits(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6),new e(e.Mode.ALPHANUMERIC,t.length,r.array)},e.makeSegments=function(t){return""==t?[]:this.NUMERIC_REGEX.test(t)?[e.makeNumeric(t)]:this.ALPHANUMERIC_REGEX.test(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]},e.makeEci=function(t){var n=new p;if(t<0)throw"ECI assignment value out of range";if(t<128)n.appendBits(t,8);else if(t<16384)n.appendBits(2,2),n.appendBits(t,14);else{if(!(t<1e6))throw"ECI assignment value out of range";n.appendBits(6,3),n.appendBits(t,21)}return new e(e.Mode.ECI,0,n.array)},e.prototype.getData=function(){return this.bitData.slice()},e.getTotalBits=function(e,t){for(var n=0,r=0,o=e;r<o.length;r++){var i=o[r],a=i.mode.numCharCountBits(t);if(i.numChars>=1<<a)return 1/0;n+=4+a+i.bitData.length}return n},e.toUtf8ByteArray=function(e){e=encodeURI(e);for(var t=[],n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t},e.NUMERIC_REGEX=/^[0-9]*$/,e.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,e.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e}(),_=function(){function e(t){if(this.coefficients=[],t<1||t>255)throw"Degree out of range";for(var n=this.coefficients,r=0;r<t-1;r++)n.push(0);n.push(1);var o=1;for(r=0;r<t;r++){for(var i=0;i<n.length;i++)n[i]=e.multiply(n[i],o),i+1<n.length&&(n[i]^=n[i+1]);o=e.multiply(o,2)}}return e.prototype.getRemainder=function(t){for(var n=this.coefficients.map((function(e){return 0})),r=function(t){var r=t^n.shift();n.push(0),o.coefficients.forEach((function(t,o){return n[o]^=e.multiply(t,r)}))},o=this,i=0,a=t;i<a.length;i++)r(a[i]);return n},e.multiply=function(e,t){if(e>>>8!=0||t>>>8!=0)throw"Byte out of range";for(var n=0,r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;if(n>>>8!=0)throw"Assertion error";return n},e}(),p=function(){function e(){this.array=[]}return e.prototype.appendBits=function(e,t){if(t<0||t>31||e>>>t!=0)throw"Value out of range";for(var n=t-1;n>=0;n--)this.array.push(e>>>n&1)},e}();(function(e){var t=function(){function e(e,t){this.ordinal=e,this.formatBits=t}return e.LOW=new e(0,1),e.MEDIUM=new e(1,0),e.QUARTILE=new e(2,3),e.HIGH=new e(3,2),e}();e.Ecc=t})(l||(l={})),function(e){var t=function(){function e(e,t){this.modeBits=e,this.numBitsCharCount=t}return e.prototype.numCharCountBits=function(e){return this.numBitsCharCount[Math.floor((e+7)/17)]},e.NUMERIC=new e(1,[10,12,14]),e.ALPHANUMERIC=new e(2,[9,11,13]),e.BYTE=new e(4,[8,16,16]),e.KANJI=new e(8,[8,10,12]),e.ECI=new e(7,[0,0,0]),e}();e.Mode=t}(d||(d={}));var h=128,f="#ffffff",m="#000000",v="#07f";function g(t,n,r,o){if("string"!=typeof t)throw new TypeError("Enter text for encoding");var i=e(e(e({},"object"==typeof n&&null!==n?n:{}),"object"==typeof o&&null!==o?o:{}),{qrSize:"object"==typeof n&&null!==n&&"number"==typeof n.qrSize?n.qrSize:n,className:"object"==typeof n&&null!==n&&"string"==typeof n.className?n.className:r}),a=[l.Ecc.LOW,l.Ecc.MEDIUM,l.Ecc.QUARTILE,l.Ecc.HIGH],s={qrSize:"number"==typeof i.qrSize?i.qrSize:h,className:"string"==typeof i.className?i.className:r||"",isShowLogo:!!i.isShowLogo||!1,isShowBackground:!!i.isShowBackground||!1,foregroundColor:"string"==typeof i.foregroundColor?i.foregroundColor:m,backgroundColor:"string"==typeof i.backgroundColor?i.backgroundColor:f,logoColor:"string"==typeof i.logoColor?i.logoColor:v,suffix:i.suffix?i.suffix.toString():"0",logoData:"string"==typeof i.logoData?i.logoData:null,ecc:"number"==typeof i.ecc&&a[i.ecc]?i.ecc:3},u=d.makeSegments(t),_=l.encodeSegments(u,a[s.ecc],1,40,-1,!0);return c(_,s)}return{createQR:g}}()},489588:(e,t,n)=>{"use strict";t.isIPadOS=t.isIPad=void 0;var r=n(279405);function o(e){e||(e=r.canUseDOM?navigator.userAgent.toLowerCase():"");var t=f(e),n=t||-1!==e.indexOf("ipad"),o=!n&&-1!==e.search(/iphone|ipod/),i=o||n,a=i&&e.match(/OS ([\d_]+) like Mac OS X/i),s=0,c=0;t?(s=13,c=0):a&&(s=+(a=a[1].split("_"))[0],c=+a[1]),a=null;var l=s<13&&!(11===s&&c<3),u=i&&function(e){if(!r.canUseDOM)return!1;var t=window.webkit;if(t&&t.messageHandlers)return!0;var n=/constructor/i.test(String(window.HTMLElement)),o=!!window.indexedDB;if(-1===e.indexOf("safari")||-1===e.indexOf("version")||navigator.standalone){if(!o&&n||!window.statusbar||!window.statusbar.visible);else if(!n||o)return!0}else;return!1}(e),d=!1;return r.canUseDOM&&(d=i&&375===screen.width&&812===screen.height&&3===window.devicePixelRatio),{isIPad:n,isIPhone:o,isIOS:i,isIPadOS:t,iosMajor:s,iosMinor:c,isWKWebView:u,isScrollBasedViewport:l,isIPhoneX:d,isIOSChrome:-1!==e.search(/crios/i)}}var i=o(),a=i.isIPad,s=i.isIPhone,c=i.isIOS,l=i.isIPadOS,u=i.iosMajor,d=i.iosMinor,_=i.isWKWebView,p=i.isScrollBasedViewport,h=i.isIPhoneX;function f(e){if(!r.canUseDOM)return!1;var t=!/ipad|iphone|ipod/.test(e);return!(!/mac os/.test(e)||!t||"boolean"!=typeof navigator.standalone)}i.isIOSChrome,t.isIPadOS=l,t.isIPad=a},279405:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onDOMLoaded=function(e){"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},t.canUseEventListeners=t.canUseDOM=void 0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n;var r=n&&!!window.addEventListener;t.canUseEventListeners=r},349598:(e,t,n)=>{"use strict";n.d(t,{classNames:()=>o});var r=n(190484);function o(){for(var e=[],t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return n.forEach((function(t){if(t)switch((0,r.default)(t)){case"string":e.push(t);break;case"object":Object.keys(t).forEach((function(n){t[n]&&e.push(n)}));break;default:e.push("".concat(t))}})),e.join(" ")}},812226:(e,t,n)=>{"use strict";function r(e){return navigator.clipboard?function(e){return navigator.clipboard.writeText(e).then((function(){return!0}))}(e):function(e){return new Promise((function(t,n){var r=document.createElement("textarea"),o=document.createRange();r.value=e,r.style.position="fixed",r.contentEditable="true",document.body.appendChild(r),r.focus(),r.select(),o.selectNodeContents(r);var i=window.getSelection();i&&(i.removeAllRanges(),i.addRange(o)),r.setSelectionRange(0,999999);try{document.execCommand("copy")?t(!0):n(new Error("copy failed"))}catch(e){n(e)}i&&i.removeAllRanges(),document.body.removeChild(r)}))}(e)}n.d(t,{copyTextToClipboard:()=>r})},898520:(e,t,n)=>{"use strict";function r(e){return!isNaN(parseFloat(e))&&isFinite(e)&&!Array.isArray(e)}n.d(t,{isNumeric:()=>r})},992888:(e,t,n)=>{"use strict";n.d(t,{isDateToday:()=>r,getLastDayOfMonth:()=>o});n(221058);function r(e){var t=new Date,n=t.getDate(),r=t.getMonth(),o=t.getFullYear();return e.getFullYear()===o&&e.getMonth()===r&&e.getDate()===n}function o(e,t){return 2==+t?function(e){return e%4==0&&e%100!=0||e%400==0}(e)?29:28:t>0&&(t<8&&t%2==0||t>7&&t%2==1)?30:31}},936212:(e,t,n)=>{"use strict";n.d(t,{formatDuration:()=>o});var r=n(221058);function o(e){if(!e)return"";var t=Math.floor(e/3600),n=Math.floor(e/60)%60,o=e%60;return e>=3600?[t,(0,r.leadingZero)(n),(0,r.leadingZero)(o)].join(":"):[n,(0,r.leadingZero)(o)].join(":")}},229327:(e,t,n)=>{"use strict";n.d(t,{isEqual:()=>o});var r=n(677270);function o(e,t){if(e===t)return!0;if(null==e||null==t||!(0,r.isObjectLike)(e)&&!(0,r.isObjectLike)(t))return e!=e&&t!=t;if((0,r.isObjectLike)(e)&&(0,r.isObjectLike)(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e){if(!e.hasOwnProperty(n)||!t.hasOwnProperty(n))return!1;if(!o(e[n],t[n]))return!1}return!0}return!1}},610628:(e,t,n)=>{"use strict";function r(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var c=o,l=Date.now();t&&l<t+r?(clearTimeout(n),n=setTimeout((function(){t=l,e.apply(c,a)}),r)):(t=l,e.apply(c,a))}}function o(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window,i=function(){return e.apply(o,r)};return function(){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];r=o,clearTimeout(n),n=setTimeout(i,t)}}n.d(t,{throttle:()=>r,debounce:()=>o})},677453:(e,t,n)=>{"use strict";function r(e){var t=e instanceof HTMLElement;if("undefined"==typeof window||!t)return{top:0,left:0,width:0,height:0};var n=e,r=n.getBoundingClientRect(),o=document.body,i=document.documentElement,a=window.pageYOffset||i.scrollTop||o.scrollTop,s=window.pageXOffset||i.scrollLeft||o.scrollLeft,c=i.clientTop||o.clientTop||0,l=i.clientLeft||o.clientLeft||0;return{top:Math.round(r.top+a-c),left:Math.round(r.left+s-l),width:n.offsetWidth,height:n.offsetHeight}}n.d(t,{getOffsetRect:()=>r})},659397:(e,t,n)=>{"use strict";n.d(t,{classNames:()=>r.classNames,copyTextToClipboard:()=>o.copyTextToClipboard,isNumeric:()=>i.isNumeric,isEqual:()=>a.isEqual,isDateToday:()=>s.isDateToday,getLastDayOfMonth:()=>s.getLastDayOfMonth,formatDuration:()=>c.formatDuration,throttle:()=>l.throttle,debounce:()=>l.debounce,getOffsetRect:()=>u.getOffsetRect,leadingZero:()=>d.leadingZero,isObjectLike:()=>_.isObjectLike,isArray:()=>_.isArray,isObject:()=>_.isObject,isString:()=>_.isString,localStorage:()=>p.localStorage});var r=n(349598),o=n(812226),i=n(898520),a=n(229327),s=n(992888),c=n(936212),l=n(610628),u=n(677453),d=n(221058),_=n(677270),p=n(933656)},221058:(e,t,n)=>{"use strict";function r(e){return e>=10?String(e):"0"+String(e)}n.d(t,{leadingZero:()=>r})},933656:(e,t,n)=>{"use strict";n.d(t,{localStorage:()=>d});var r,o=n(306610),i=n(5991),a=n(896156),s=function(){function e(){var t=this;(0,o.default)(this,e),(0,a.default)(this,"data",{}),(0,a.default)(this,"getItem",(function(e){return t.data.hasOwnProperty(e)?t.data[e]:null})),(0,a.default)(this,"keys",(function(){return Object.keys(t.data)}))}return(0,i.default)(e,[{key:"setItem",value:function(e,t){this.data[e]=String(t)}},{key:"removeItem",value:function(e){delete this.data[e]}},{key:"clear",value:function(){this.data={}}},{key:"key",value:function(e){return Object.keys(this.data)[e]}},{key:"length",get:function(){return Object.keys(this.data).length}}]),e}(),c="vk-ls-dummy",l="test";function u(){if(r)return r;try{if(window.localStorage.setItem(c,l),l!==window.localStorage.getItem(c))throw new Error("localStorage is broken");window.localStorage.removeItem(c),r=window.localStorage}catch(e){r=new s}return r}var d={setItem:function(e,t){return u().setItem(e,t)},getItem:function(e){return u().getItem(e)},removeItem:function(e){return u().removeItem(e)},clear:function(){return u().clear()},length:function(){return u().length},key:function(e){return u().key(e)},keys:function(){var e=u();return e instanceof s?e.keys():Object.keys(e)},getPrefixedKeys:function(e){return d.keys().filter((function(t){return t.startsWith(e)}))}}},677270:(e,t,n)=>{"use strict";n.d(t,{isObjectLike:()=>o,isArray:()=>i,isObject:()=>a,isString:()=>s});var r=n(190484);function o(e){return"object"===(0,r.default)(e)&&null!==e}function i(e){return Array.isArray(e)}function a(e){return"[object Object]"===Object.prototype.toString.call(e)}function s(e){return"string"==typeof e}},745433:(e,t,n)=>{"use strict";n.d(t,{ActionSheet:()=>b});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(949444),l=n(362276),u=n(108681),d=n(786543),_=n(231586),p=n(256631),h=n(218795),f=n(443910),m=n(119360),v=n(855356),g=n(324285),y=n(854193),E=n(644029),w=["children","className","header","text","style","iosCloseItem"],b=((0,E.warnOnce)("ActionSheet"),function(e){var t=e.children,n=e.className,E=e.header,b=e.text,C=e.style,S=e.iosCloseItem,T=(0,i.default)(e,w),A=(0,m.usePlatform)(),D=s.useState(!1),P=(0,o.default)(D,2),O=P[0],I=P[1],k=function(){return I(!0)},R=s.useRef(p.noop);var M=(0,g.useAdaptivity)(),L=M.viewWidth,x=M.viewHeight,N=M.hasMouse,B=L>=l.ViewWidth.SMALL_TABLET&&(N||x>=l.ViewHeight.MEDIUM),U=A===u.IOS?300:200;B&&(U=0);var F=(0,v.useTimeout)((function(){T.onClose(),R.current(),R.current=p.noop}),U);s.useEffect((function(){O?F.set():F.clear()}),[O]);var W=s.useCallback((function(e,t,n){return function(r){r.persist(),t&&t(r),n?(R.current=function(){return e&&e(r)},I(!0)):e&&e(r)}}),[]),V=(0,y.useObjectMemo)({onItemClick:W,isDesktop:B}),H=B?d.ActionSheetDropdownDesktop:_.ActionSheetDropdown;return(0,a.createScopedElement)(c.PopoutWrapper,{closing:O,alignY:"bottom",className:n,style:C,onClick:B?null:k,hasMask:!B,fixed:!B},(0,a.createScopedElement)(h.ActionSheetContext.Provider,{value:V},(0,a.createScopedElement)(H,(0,r.default)({closing:O,timeout:U},T,{onClose:k}),((0,p.hasReactNode)(E)||(0,p.hasReactNode)(b))&&(0,a.createScopedElement)("header",{vkuiClass:"ActionSheet__header"},(0,p.hasReactNode)(E)&&(0,a.createScopedElement)(f.default,{level:"1",weight:A===u.IOS?"semibold":"medium",vkuiClass:"ActionSheet__title"},E),(0,p.hasReactNode)(b)&&(0,a.createScopedElement)(f.default,{level:"1",weight:"regular",vkuiClass:"ActionSheet__text"},b)),t,A===u.IOS&&!B&&S)))});b.defaultProps={popupDirection:"bottom"}},218795:(e,t,n)=>{"use strict";n.d(t,{ActionSheetContext:()=>r});var r=n(667294).createContext({})},231586:(e,t,n)=>{"use strict";n.d(t,{ActionSheetDropdown:()=>_});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(93781),c=n(119360),l=n(843718),u=["children","closing","toggleRef","popupDirection"],d=function(e){return e.stopPropagation()},_=function(e){var t=e.children,n=e.closing,_=(e.toggleRef,e.popupDirection,(0,o.default)(e,u)),p=(0,c.usePlatform)(),h=(0,a.getClassName)("ActionSheet",p);return(0,i.createScopedElement)(l.FocusTrap,(0,r.default)({},_,{onClick:d,vkuiClass:(0,s.classNames)(h,{"ActionSheet--closing":n})}),t)}},786543:(e,t,n)=>{"use strict";n.d(t,{ActionSheetDropdownDesktop:()=>g});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(780778),l=n(93781),u=n(181498),d=n(119360),_=n(324285),p=n(644029),h=n(214542),f=n(151571),m=n(843718),v=["children","toggleRef","closing","popupDirection","onClose"];(0,p.warnOnce)("ActionSheet");var g=function(e){var t=e.children,n=e.toggleRef,p=(e.closing,e.popupDirection),g=e.onClose,y=(0,i.default)(e,v),E=(0,u.useDOM)(),w=E.window,b=E.document,C=(0,d.usePlatform)(),S=(0,_.useAdaptivity)().sizeY,T=s.useRef(),A=s.useState({left:0,top:0,opacity:0,pointerEvents:"none"}),D=(0,o.default)(A,2),P=D[0],O=D[1];(0,h.useIsomorphicLayoutEffect)((function(){var e,t=(e=n)&&"current"in e?e.current:e;if(t){var r=t.getBoundingClientRect(),o=T.current.getBoundingClientRect(),i="top"===p||"function"==typeof p&&"top"===p(T);O({left:r.left+r.width-o.width+w.pageXOffset,top:r.top+w.pageYOffset+(i?-o.height:r.height)})}}),[n]);var I=(0,f.useEventListener)("click",(function(e){var t=null==T?void 0:T.current;t&&!t.contains(e.target)&&g()}));s.useEffect((function(){setTimeout((function(){I.add(b.body)}))}),[]);var k=s.useCallback((function(e){return e.stopPropagation()}),[]);return(0,a.createScopedElement)(m.FocusTrap,(0,r.default)({onClose:g},y,{getRootRef:T,onClick:k,style:P,vkuiClass:(0,l.classNames)((0,c.getClassName)("ActionSheet",C),"ActionSheet--desktop","ActionSheet--sizeY-".concat(S))}),t)}},942347:(e,t,n)=>{"use strict";n.d(t,{default:()=>S});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(93781),c=n(780778),l=n(795281),u=n(119360),d=n(256631),_=n(243912),p=n(931252),h=n(455833),f=n(108681),m=n(495707),v=n(416259),g=n(218795),y=n(443910),E=n(362276),w=n(672705),b=["children","autoclose","mode","meta","subtitle","before","selectable","value","name","checked","defaultChecked","onChange","onClick","sizeY","onImmediateClick"],C=function(e){var t=e.children,n=e.autoclose,w=e.mode,C=e.meta,S=e.subtitle,T=e.before,A=e.selectable,D=e.value,P=e.name,O=e.checked,I=e.defaultChecked,k=e.onChange,R=e.onClick,M=e.sizeY,L=e.onImmediateClick,x=(0,o.default)(e,b),N=(0,u.usePlatform)(),B=a.useContext(g.ActionSheetContext),U=B.onItemClick,F=void 0===U?function(){return d.noop}:U,W=B.isDesktop,V=x.href?"a":"div";A&&(V="label");var H=(0,d.hasReactNode)(S)||(0,d.hasReactNode)(C)||A;return(0,i.createScopedElement)(l.default,(0,r.default)({},x,{onClick:A?R:F(R,L,n),activeMode:"ActionSheetItem--active",vkuiClass:(0,s.classNames)((0,c.getClassName)("ActionSheetItem",N),"ActionSheetItem--".concat(w),"ActionSheetItem--sizeY-".concat(M),{"ActionSheetItem--compact":H,"ActionSheetItem--desktop":W,"ActionSheetItem--withSubtitle":(0,d.hasReactNode)(S)}),Component:V}),(0,d.hasReactNode)(T)&&(0,i.createScopedElement)("div",{vkuiClass:"ActionSheetItem__before"},T),(0,i.createScopedElement)("div",{vkuiClass:"ActionSheetItem__container"},(0,i.createScopedElement)("div",{vkuiClass:"ActionSheetItem__content"},M===E.SizeType.COMPACT?(0,i.createScopedElement)(a.Fragment,null,(0,i.createScopedElement)(h.default,{weight:"cancel"===w?"medium":"regular",vkuiClass:"ActionSheetItem__children"},t),(0,d.hasReactNode)(C)&&(0,i.createScopedElement)(h.default,{weight:"regular",vkuiClass:"ActionSheetItem__meta"},C)):(0,i.createScopedElement)(a.Fragment,null,(0,i.createScopedElement)(p.default,{weight:"cancel"===w?"medium":"regular",level:H||(0,d.hasReactNode)(T)||N===f.ANDROID?"3":"2",vkuiClass:"ActionSheetItem__children"},t),(0,d.hasReactNode)(C)&&(0,i.createScopedElement)(p.default,{weight:"regular",level:H||(0,d.hasReactNode)(T)||N===f.ANDROID?"3":"2",vkuiClass:"ActionSheetItem__meta"},C))),(0,d.hasReactNode)(S)&&(M===E.SizeType.COMPACT?(0,i.createScopedElement)(y.default,{weight:"regular",vkuiClass:"ActionSheetItem__subtitle",level:"1"},S):(0,i.createScopedElement)(_.default,{weight:"regular",vkuiClass:"ActionSheetItem__subtitle"},S))),A&&(0,i.createScopedElement)("div",{vkuiClass:"ActionSheetItem__after"},(0,i.createScopedElement)("input",{type:"radio",vkuiClass:"ActionSheetItem__radio",name:P,value:D,onChange:k,onClick:F(d.noop,d.noop,n),defaultChecked:I,checked:O,disabled:x.disabled}),(0,i.createScopedElement)("div",{vkuiClass:"ActionSheetItem__marker"},N===f.VKCOM?(0,i.createScopedElement)(m.default,null):(0,i.createScopedElement)(v.default,null))))};C.defaultProps={mode:"default"};const S=(0,w.withAdaptivity)(C,{sizeY:!0})},362276:(e,t,n)=>{"use strict";n.d(t,{SizeType:()=>r,ViewWidth:()=>o,ViewHeight:()=>i,AdaptivityContext:()=>c});var r,o,i,a=n(667294),s=n(962557);!function(e){e.COMPACT="compact",e.REGULAR="regular"}(r||(r={})),function(e){e[e.SMALL_MOBILE=1]="SMALL_MOBILE",e[e.MOBILE=2]="MOBILE",e[e.SMALL_TABLET=3]="SMALL_TABLET",e[e.TABLET=4]="TABLET",e[e.DESKTOP=5]="DESKTOP"}(o||(o={})),function(e){e[e.EXTRA_SMALL=1]="EXTRA_SMALL",e[e.SMALL=2]="SMALL",e[e.MEDIUM=3]="MEDIUM"}(i||(i={}));var c=a.createContext({sizeX:r.COMPACT,sizeY:r.REGULAR,hasMouse:s.hasMouse,deviceHasHover:s.hasHover})},133893:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var r=n(46008),o=n(735567),i=n(667294),a=n(962557),s=n(362276),c=n(181498);function l(e){var t=i.useRef(null),n=i.useState({}),a=(0,r.default)(n,2)[1],l=(0,c.useDOM)().window;return t.current||(t.current=u(l?l.innerWidth:0,l?l.innerHeight:0,e)),i.useEffect((function(){function n(){var n=u(l.innerWidth,l.innerHeight,e),r=t.current,o=r.viewWidth,i=r.viewHeight,s=r.sizeX,c=r.sizeY,d=r.hasMouse,_=r.deviceHasHover;o===n.viewWidth&&i===n.viewHeight&&s===n.sizeX&&c===n.sizeY&&d===n.hasMouse&&_===n.deviceHasHover||(t.current=n,a({}))}return n(),l.addEventListener("resize",n,!1),function(){l.removeEventListener("resize",n,!1)}}),[e.viewWidth,e.viewHeight,e.sizeX,e.sizeY,e.hasMouse,e.deviceHasHover]),(0,o.createScopedElement)(s.AdaptivityContext.Provider,{value:t.current},e.children)}function u(e,t,n){var r,o,i=s.ViewWidth.SMALL_MOBILE,c=s.ViewHeight.SMALL,l=s.SizeType.REGULAR,u=s.SizeType.REGULAR,d=null!==(r=n.hasMouse)&&void 0!==r?r:a.hasMouse,_=null!==(o=n.deviceHasHover)&&void 0!==o?o:a.hasHover;return i=e>=1280?s.ViewWidth.DESKTOP:e>=1024?s.ViewWidth.TABLET:e>=768?s.ViewWidth.SMALL_TABLET:e>=320?s.ViewWidth.MOBILE:s.ViewWidth.SMALL_MOBILE,c=t>=720?s.ViewHeight.MEDIUM:t>414?s.ViewHeight.SMALL:s.ViewHeight.EXTRA_SMALL,n.viewWidth&&(i=n.viewWidth),n.viewHeight&&(c=n.viewHeight),i<=s.ViewWidth.MOBILE&&(u=s.SizeType.COMPACT),(i>=s.ViewWidth.SMALL_TABLET&&d||c<=s.ViewHeight.EXTRA_SMALL)&&(l=s.SizeType.COMPACT),n.sizeX&&(u=n.sizeX),n.sizeY&&(l=n.sizeY),{viewWidth:i,viewHeight:c,sizeX:u,sizeY:l,hasMouse:d,deviceHasHover:_}}},409380:(e,t,n)=>{"use strict";n.d(t,{default:()=>k});var r=n(300975),o=n(243835),i=n(640137),a=n(101226),s=n(171178),c=n(351475),l=n(682754),u=n(939844),d=n(735567),_=n(667294),p=n(795281),h=n(949444),f=n(780778),m=n(93781),v=n(23220),g=n(108681),y=n(212602),E=n(362276),w=n(672705),b=n(658113),C=n(256631),S=n(115446),T=n(931252),A=n(443910),D=n(443890),P=n(843718),O=["actions","actionsLayout","children","className","style","platform","viewWidth","text","header"],I=function(e){(0,c.default)(n,e);var t=(0,l.default)(n);function n(e){var r;return(0,i.default)(this,n),r=t.call(this,e),(0,u.default)((0,s.default)(r),"element",void 0),(0,u.default)((0,s.default)(r),"transitionFinishTimeout",void 0),(0,u.default)((0,s.default)(r),"onItemClick",(function(e){return function(){var t=e.action,n=e.autoclose;n?(r.setState({closing:!0}),r.waitTransitionFinish((function(e){e&&"opacity"!==e.propertyName||(n&&r.props.onClose(),t&&t())}))):t&&t()}})),(0,u.default)((0,s.default)(r),"onClose",(function(){r.setState({closing:!0}),r.waitTransitionFinish((function(e){e&&"opacity"!==e.propertyName||r.props.onClose()}))})),(0,u.default)((0,s.default)(r),"stopPropagation",(function(e){e.stopPropagation()})),(0,u.default)((0,s.default)(r),"renderAction",(function(e,t){var n=r.props.platform;if(n===g.IOS){var o=e.Component,i=void 0===o?"button":o;return(0,d.createScopedElement)(p.default,{Component:e.href?"a":i,vkuiClass:(0,m.classNames)("Alert__action","Alert__action--".concat(e.mode)),onClick:r.onItemClick(e),href:e.href,key:"alert-action-".concat(t),target:e.target},e.title)}var a="cancel"===e.mode?"secondary":"primary";return n===g.ANDROID&&(a="tertiary",r.props.viewWidth===E.ViewWidth.DESKTOP&&"destructive"===e.mode&&(a="destructive")),(0,d.createScopedElement)(b.default,{vkuiClass:(0,m.classNames)("Alert__button","Alert__button--".concat(e.mode)),mode:a,size:"m",onClick:r.onItemClick(e),Component:e.Component,href:e.href,key:"alert-action-".concat(t),target:e.target},e.title)})),r.element=_.createRef(),r.state={closing:!1},r}return(0,a.default)(n,[{key:"timeout",get:function(){return this.props.platform===g.ANDROID||this.props.platform===g.VKCOM?200:300}},{key:"waitTransitionFinish",value:function(e){v.transitionEvent.supported?(this.element.current.removeEventListener(v.transitionEvent.name,e),this.element.current.addEventListener(v.transitionEvent.name,e)):(clearTimeout(this.transitionFinishTimeout),this.transitionFinishTimeout=setTimeout(e.bind(this),this.timeout))}},{key:"renderHeader",value:function(e){switch(this.props.platform){case g.VKCOM:return(0,d.createScopedElement)(S.default,{vkuiClass:"Alert__header",weight:"medium"},e);case g.IOS:return(0,d.createScopedElement)(T.default,{vkuiClass:"Alert__header",weight:"semibold",level:"3"},e);case g.ANDROID:return(0,d.createScopedElement)(T.default,{vkuiClass:"Alert__header",weight:"medium",level:"2"},e)}}},{key:"renderText",value:function(e){switch(this.props.platform){case g.VKCOM:return(0,d.createScopedElement)(A.default,{vkuiClass:"Alert__text",level:"1",weight:"regular"},e);case g.IOS:return(0,d.createScopedElement)(A.default,{vkuiClass:"Alert__text",level:"2",weight:"regular"},e);case g.ANDROID:return(0,d.createScopedElement)(S.default,{vkuiClass:"Alert__text",weight:"regular"},e)}}},{key:"render",value:function(){var e=this.props,t=e.actions,n=e.actionsLayout,i=e.children,a=e.className,s=e.style,c=e.platform,l=e.viewWidth,u=e.text,_=e.header,p=(0,o.default)(e,O),v=this.state.closing,y=c===g.VKCOM?"horizontal":n,w=c===g.VKCOM||c===g.ANDROID&&l>=E.ViewWidth.SMALL_TABLET,b=l>=E.ViewWidth.SMALL_TABLET;return(0,d.createScopedElement)(h.PopoutWrapper,{className:a,closing:v,style:s,onClick:this.onClose},(0,d.createScopedElement)(P.FocusTrap,(0,r.default)({},p,{getRootRef:this.element,onClick:this.stopPropagation,onClose:this.onClose,timeout:this.timeout,vkuiClass:(0,m.classNames)((0,f.getClassName)("Alert",c),{"Alert--v":"vertical"===y,"Alert--h":"horizontal"===y,"Alert--closing":v,"Alert--desktop":b})}),w&&(0,d.createScopedElement)(D.default,{onClick:this.onClose}),(0,d.createScopedElement)("div",{vkuiClass:"Alert__content"},(0,C.hasReactNode)(_)&&this.renderHeader(_),(0,C.hasReactNode)(u)&&this.renderText(u),i),(0,d.createScopedElement)("footer",{vkuiClass:"Alert__actions"},t.map(this.renderAction))))}}]),n}(_.Component);(0,u.default)(I,"defaultProps",{actionsLayout:"horizontal",actions:[]});const k=(0,y.withPlatform)((0,w.withAdaptivity)(I,{viewWidth:!0}))},927101:(e,t,n)=>{"use strict";n.d(t,{AppRoot:()=>C});var r=n(300975),o=n(239626),i=n(46008),a=n(243835),s=n(735567),c=n(667294),l=n(181498),u=n(93781),d=n(338784),_=n(672705),p=n(362276),h=n(214542),f=n(95022),m=n(76854),v=n(909795),g=n(256631),y=n(644029),E=n(162649),w=n(720194),b=["children","mode","embedded","sizeX","hasMouse","noLegacyClasses","scroll"],C=((0,y.warnOnce)("AppRoot"),(0,_.withAdaptivity)((function(e){var t=e.children,n=e.mode,_=e.embedded,y=e.sizeX,C=e.hasMouse,S=e.noLegacyClasses,T=void 0!==S&&S,A=e.scroll,D=void 0===A?"global":A,P=(0,a.default)(e,b),O=n||(_?"embedded":"full"),I=(0,E.useKeyboardInputTracker)(),k=c.useRef(),R=c.useState(null),M=(0,i.default)(R,2),L=M[0],x=M[1],N=(0,l.useDOM)(),B=N.window,U=N.document,F=(0,w.useInsets)(),W=c.useRef(!1);W.current||(B&&"full"===O&&U.documentElement.classList.add("vkui"),f.classScopingMode.noConflict=T,W.current=!0),(0,h.useIsomorphicLayoutEffect)((function(){var e=U.createElement("div");return e.classList.add("vkui__portal-root"),U.body.appendChild(e),x(e),function(){e.parentElement.removeChild(e)}}),[]),(0,h.useIsomorphicLayoutEffect)((function(){var e;if("partial"===O)return g.noop;var t=k.current.parentElement,n=["vkui__root"].concat("embedded"===O?"vkui__root--embedded":[]);return(e=t.classList).add.apply(e,(0,o.default)(n)),function(){var e;(e=t.classList).remove.apply(e,(0,o.default)(n)),"full"===O&&U.documentElement.classList.remove("vkui")}}),[]),(0,h.useIsomorphicLayoutEffect)((function(){if("partial"===O)return g.noop;var e=k.current.parentElement;for(var t in F)if(F.hasOwnProperty(t)&&"number"==typeof F[t]){var n=F[t];e.style.setProperty("--safe-area-inset-".concat(t),"".concat(n,"px")),L&&L.style.setProperty("--safe-area-inset-".concat(t),"".concat(n,"px"))}return function(){for(var t in F)F.hasOwnProperty(t)&&(e.style.removeProperty("--safe-area-inset-".concat(t)),L&&L.style.removeProperty("--safe-area-inset-".concat(t)))}}),[F,L]),(0,h.useIsomorphicLayoutEffect)((function(){if("partial"===O||y!==p.SizeType.REGULAR)return g.noop;var e="embedded"===O?k.current.parentElement:U.body;return e.classList.add("vkui--sizeX-regular"),function(){return e.classList.remove("vkui--sizeX-regular")}}),[y]);var V=c.useMemo((function(){return"contain"===D?(0,v.elementScrollController)(k):(0,v.globalScrollController)(B,U)}),[D]),H=(0,s.createScopedElement)(d.AppRootContext.Provider,{value:{appRoot:k,portalRoot:L,embedded:"embedded"===O,keyboardInput:I,mode:O}},(0,s.createScopedElement)(v.ScrollContext.Provider,{value:V},(0,s.createScopedElement)(m.IconSettingsProvider,{classPrefix:"vkui",globalClasses:!T},t)));return"partial"===O?H:(0,s.createScopedElement)("div",(0,r.default)({ref:k,vkuiClass:(0,u.classNames)("AppRoot",{"AppRoot--no-mouse":!C,"AppRoot--keyboard-input":I})},P),H)}),{sizeX:!0,hasMouse:!0}))},338784:(e,t,n)=>{"use strict";n.d(t,{AppRootContext:()=>r});var r=n(667294).createContext({portalRoot:null})},645083:(e,t,n)=>{"use strict";n.d(t,{AppRootPortal:()=>s});var r=n(735567),o=n(667294),i=n(973935),a=n(338784),s=function(e){var t,n=e.children,s=e.className,c=e.forcePortal,l=o.useContext(a.AppRootContext),u=l.portalRoot,d=l.mode;return c=null!==(t=c)&&void 0!==t?t:"full"!==d,u&&c?(0,i.createPortal)((0,r.createScopedElement)("div",{className:s},n),u):(0,r.createScopedElement)(o.Fragment,null,n)}},909795:(e,t,n)=>{"use strict";n.d(t,{ScrollContext:()=>a,globalScrollController:()=>s,elementScrollController:()=>c});var r=n(667294),o=n(256631),i=n(633656),a=r.createContext({getScroll:function(){return{x:0,y:0}},scrollTo:o.noop}),s=function(e,t){return{getScroll:function(){return{x:e.pageXOffset,y:e.pageYOffset}},scrollTo:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e.scrollTo(n?(0,i.clamp)(n,0,t.body.scrollWidth-e.innerWidth):0,r?(0,i.clamp)(r,0,t.body.scrollHeight-e.innerHeight):0)}}},c=function(e){return{getScroll:function(){return{x:e.current.scrollLeft,y:e.current.scrollTop}},scrollTo:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.current;r.scrollTo(t?(0,i.clamp)(t,0,r.scrollWidth-r.clientWidth):0,n?(0,i.clamp)(n,0,r.scrollHeight-r.clientHeight):0)}}}},900863:(e,t,n)=>{"use strict";n.d(t,{AVATAR_DEFAULT_SIZE:()=>h,AVATAR_DEFAULT_SHADOW:()=>f,default:()=>m});var r=n(300975),o=n(309919),i=n(46008),a=n(243835),s=n(735567),c=n(667294),l=n(780778),u=n(93781),d=n(119360),_=["alt","crossOrigin","decoding","height","loading","referrerPolicy","sizes","src","srcSet","useMap","width","getRef","size","shadow","mode","className","children","getRootRef","style","aria-label"],p=function(e){var t=e.alt,n=e.crossOrigin,p=e.decoding,h=e.height,f=e.loading,m=e.referrerPolicy,v=e.sizes,g=e.src,y=e.srcSet,E=e.useMap,w=e.width,b=e.getRef,C=e.size,S=e.shadow,T=e.mode,A=e.className,D=e.children,P=e.getRootRef,O=e.style,I=e["aria-label"],k=(0,a.default)(e,_),R=(0,d.usePlatform)(),M=c.useState(!1),L=(0,i.default)(M,2),x=L[0],N=L[1],B="50%";switch(T){case"image":C<64&&(B=4),C>=64&&C<96&&(B=6),C>=96&&(B=8);break;case"app":C<=40&&(B=8),C>40&&C<56&&(B=10),C>=56&&C<64&&(B=12),C>=64&&C<84&&(B=16),C>=84&&(B=18)}var U=g||y;return(0,s.createScopedElement)("div",(0,r.default)({},k,{vkuiClass:(0,u.classNames)((0,l.getClassName)("Avatar",R),"Avatar--type-".concat(T),"Avatar--sz-".concat(C),{"Avatar--shadow":S,"Avatar--failed":x}),className:A,ref:P,role:U?"img":"presentation","aria-label":t||I,style:(0,o.default)((0,o.default)({},O),{},{width:C,height:C,borderRadius:B})}),U&&(0,s.createScopedElement)("img",{crossOrigin:n,decoding:p,height:h,loading:f,referrerPolicy:m,sizes:v,src:g,srcSet:y,useMap:E,width:w,ref:b,onError:function(){N(!0)},onLoad:function(){N(!1)},vkuiClass:"Avatar__img",alt:""}),D&&(0,s.createScopedElement)("div",{vkuiClass:"Avatar__children"},D))},h=48,f=!0;p.defaultProps={size:h,mode:"default",shadow:f};const m=p},278763:(e,t,n)=>{"use strict";n.d(t,{Badge:()=>u});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(93781),c=n(119360),l=["mode"],u=function(e){var t=e.mode,n=(0,o.default)(e,l),u=(0,c.usePlatform)();return(0,i.createScopedElement)("span",(0,r.default)({vkuiClass:(0,s.classNames)((0,a.getClassName)("Badge",u),"Badge--".concat(t))},n))};u.defaultProps={mode:"new"}},857991:(e,t,n)=>{"use strict";n.d(t,{default:()=>P});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(93781),l=n(119360),u=n(108681),d=n(256631),_=n(783199),p=n(733024),h=n(625578),f=n(684773),m=n(795281),v=n(600245),g=n(115446),y=n(243912),E=n(455833),w=n(931252),b=["size"],C=["size"],S=["mode","imageTheme","size","before","asideMode","header","subheader","text","children","background","actions","onDismiss","dismissLabel"],T=function(e){var t=e.size,n=(0,o.default)(e,b);return"m"===t?(0,i.createScopedElement)(w.default,(0,r.default)({level:"2",weight:"medium"},n)):(0,i.createScopedElement)(g.default,(0,r.default)({weight:"medium"},n))},A=function(e){var t=e.size,n=(0,o.default)(e,C);return"m"===t?(0,i.createScopedElement)(E.default,(0,r.default)({weight:"regular"},n)):(0,i.createScopedElement)(y.default,(0,r.default)({weight:"regular"},n))},D=function(e){var t=(0,l.usePlatform)(),n=e.mode,g=e.imageTheme,y=e.size,w=e.before,b=e.asideMode,C=e.header,D=e.subheader,P=e.text,O=(e.children,e.background),I=e.actions,k=e.onDismiss,R=e.dismissLabel,M=(0,o.default)(e,S);return(0,i.createScopedElement)("section",(0,r.default)({},M,{vkuiClass:(0,c.classNames)((0,s.getClassName)("Banner",t),"Banner--md-".concat(n),"Banner--sz-".concat(y),{"Banner--inverted":"image"===n&&"dark"===g})}),(0,i.createScopedElement)(m.default,{vkuiClass:"Banner__in",activeMode:t===u.IOS?"opacity":"background",disabled:"expand"!==b,role:"expand"===b?"button":null},"image"===n&&O&&(0,i.createScopedElement)("div",{"aria-hidden":"true",vkuiClass:"Banner__bg"},O),w&&(0,i.createScopedElement)("div",{vkuiClass:"Banner__before"},w),(0,i.createScopedElement)("div",{vkuiClass:"Banner__content"},(0,d.hasReactNode)(C)&&(0,i.createScopedElement)(T,{size:y,Component:"span",vkuiClass:"Banner__header"},C),(0,d.hasReactNode)(D)&&(0,i.createScopedElement)(A,{Component:"span",size:y,vkuiClass:"Banner__subheader"},D),(0,d.hasReactNode)(P)&&(0,i.createScopedElement)(E.default,{weight:"regular",vkuiClass:"Banner__text"},P),(0,d.hasReactNode)(I)&&a.Children.count(I)>0&&(0,i.createScopedElement)("div",{vkuiClass:"Banner__actions"},I)),!!b&&(0,i.createScopedElement)("div",{vkuiClass:"Banner__aside"},"expand"===b&&(0,i.createScopedElement)(_.default,null),"dismiss"===b&&(0,i.createScopedElement)(v.default,{"aria-label":R,vkuiClass:"Banner__dismiss",onClick:k,hoverMode:"opacity",hasActive:!1},(t===u.ANDROID||t===u.VKCOM)&&(0,i.createScopedElement)(p.default,null),t===u.IOS&&("image"===n?(0,i.createScopedElement)(h.default,null):(0,i.createScopedElement)(f.default,null))))))};D.defaultProps={dismissLabel:"Скрыть",mode:"tint",size:"s",imageTheme:"dark"};const P=D},658113:(e,t,n)=>{"use strict";n.d(t,{default:()=>C});var r=n(939844),o=n(300975),i=n(243835),a=n(735567),s=n(780778),c=n(93781),l=n(795281),u=n(931252),d=n(455833),_=n(243912),p=n(443910),h=n(119360),f=n(362276),m=n(672705),v=n(108681),g=n(474353),y=["size","sizeY","platform"],E=["size","mode","stretched","align","children","before","after","getRootRef","sizeY","Component","loading","onClick"],w=function(e){var t=e.size,n=e.sizeY,r=e.platform,s=(0,i.default)(e,y),c=n===f.SizeType.COMPACT;switch(t){case"l":return c?(0,a.createScopedElement)(d.default,(0,o.default)({weight:"medium"},s)):(0,a.createScopedElement)(u.default,(0,o.default)({level:"3",weight:"medium"},s));case"m":return c?(0,a.createScopedElement)(_.default,(0,o.default)({weight:r===v.VKCOM?"regular":"medium"},s)):(0,a.createScopedElement)(d.default,(0,o.default)({weight:"medium"},s));default:return r===v.IOS?(0,a.createScopedElement)(_.default,(0,o.default)({weight:"medium"},s)):r===v.VKCOM?(0,a.createScopedElement)(p.default,(0,o.default)({level:"1",weight:"regular"},s)):c?(0,a.createScopedElement)(p.default,(0,o.default)({level:"1",weight:"medium"},s)):(0,a.createScopedElement)(_.default,(0,o.default)({weight:"medium"},s))}},b=function(e){var t,n=(0,h.usePlatform)(),u=e.size,d=e.mode,_=e.stretched,p=e.align,f=e.children,m=e.before,v=e.after,y=e.getRootRef,b=e.sizeY,C=e.Component,S=void 0===C?"button":C,T=e.loading,A=e.onClick,D=(0,i.default)(e,E),P=Boolean(m||v);return(0,a.createScopedElement)(l.default,(0,o.default)({},D,{Component:D.href?"a":S,onClick:T?null:A,focusVisibleMode:"outside",vkuiClass:(0,c.classNames)((0,s.getClassName)("Button",n),"Button--sz-".concat(u),"Button--lvl-".concat(d),"Button--aln-".concat(p),"Button--sizeY-".concat(b),(t={},(0,r.default)(t,"Button--stretched",_),(0,r.default)(t,"Button--with-icon",P),t)),getRootRef:y,activeMode:"opacity"}),T&&(0,a.createScopedElement)(g.default,{size:"small",vkuiClass:"Button__spinner"}),(0,a.createScopedElement)("span",{vkuiClass:"Button__in"},m&&(0,a.createScopedElement)("span",{vkuiClass:"Button__before"},m),f&&(0,a.createScopedElement)(w,{size:u,sizeY:b,platform:n,vkuiClass:"Button__content",Component:"span"},f),v&&(0,a.createScopedElement)("span",{vkuiClass:"Button__after"},v)))};b.defaultProps={mode:"primary",align:"center",size:"s",stretched:!1,stopPropagation:!0};const C=(0,m.withAdaptivity)(b,{sizeY:!0})},138590:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var r=n(300975),o=n(243835),i=n(735567),a=n(93781),s=n(780778),c=n(119360),l=["mode","children","getRootRef"],u=function(e){var t=e.mode,n=e.children,u=e.getRootRef,d=(0,o.default)(e,l),_=(0,c.usePlatform)();return(0,i.createScopedElement)("div",(0,r.default)({},d,{ref:u,vkuiClass:(0,a.classNames)((0,s.getClassName)("Card",_),"Card--md-".concat(t))}),(0,i.createScopedElement)("div",{vkuiClass:"Card__in"},n))};u.defaultProps={mode:"tint"};const d=u},828204:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(243835),i=n(735567),a=n(93781),s=n(780778),c=n(119360),l=n(672705),u=["children","size","sizeX"],d=function(e){var t=e.children,n=e.size,l=e.sizeX,d=(0,o.default)(e,u),_=(0,c.usePlatform)();return(0,i.createScopedElement)("div",(0,r.default)({},d,{vkuiClass:(0,a.classNames)((0,s.getClassName)("CardGrid",_),"CardGrid--".concat(n),"CardGrid--sizeX-".concat(l))}),t)};d.defaultProps={size:"s"};const _=(0,l.withAdaptivity)(d,{sizeX:!0})},208954:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(93781),c=n(780778),l=n(119360),u=n(635717),d=n(672705),_=n(181498),p=["children","size","sizeX"],h=function(e){var t=e.children,n=e.size,d=e.sizeX,h=(0,o.default)(e,p),f=(0,l.usePlatform)(),m=a.useRef(null),v=a.useRef(null),g=(0,_.useDOM)().window;return(0,i.createScopedElement)("div",(0,r.default)({},h,{vkuiClass:(0,s.classNames)((0,c.getClassName)("CardScroll",f),"CardScroll--".concat(n),"CardScroll--sizeX-".concat(d))}),(0,i.createScopedElement)(u.default,{getScrollToLeft:function(e){var t=m.current.offsetWidth,n=Array.from(m.current.children).findIndex((function(t){return t.offsetLeft+t.offsetWidth+parseInt(g.getComputedStyle(t).marginRight)-e>=0}));if(-1===n)return e;if(0===n)return 0;var r=m.current.children[n],o=r.offsetLeft-(t-r.offsetWidth)+v.current.offsetWidth;return o<=2*v.current.offsetWidth?0:o},getScrollToRight:function(e){var t=m.current.offsetWidth,n=Array.prototype.find.call(m.current.children,(function(n){return n.offsetLeft+n.offsetWidth-e>t}));return n?n.offsetLeft-v.current.offsetWidth:e},showArrows:!0},(0,i.createScopedElement)("div",{vkuiClass:"CardScroll__in",ref:m},(0,i.createScopedElement)("span",{vkuiClass:"CardScroll__gap",ref:v}),t,(0,i.createScopedElement)("span",{vkuiClass:"CardScroll__gap"}))))};h.defaultProps={size:"s"};const f=(0,d.withAdaptivity)(h,{sizeX:!0})},426162:(e,t,n)=>{"use strict";n.d(t,{Cell:()=>E});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(93781),c=n(644029),l=n(780778),u=n(108681),d=n(426305),_=n(594735),p=n(119360),h=n(912518),f=n(554035),m=n(836161),v=n(190071),g=["mode","onRemove","removePlaceholder","onDragFinish","before","after","disabled","removable","draggable","selectable","Component","onChange","name","value","checked","defaultChecked","getRootRef","draggerLabel","className","style"],y=["dragging","rootElRef"],E=((0,c.warnOnce)("Cell"),function(e){var t=e.mode,n=e.onRemove,c=e.removePlaceholder,E=void 0===c?"Удалить":c,w=e.onDragFinish,b=e.before,C=e.after,S=e.disabled,T=e.removable,A=e.draggable,D=e.selectable,P=e.Component,O=e.onChange,I=e.name,k=e.value,R=e.checked,M=e.defaultChecked,L=(e.getRootRef,e.draggerLabel),x=void 0===L?"Перенести ячейку":L,N=e.className,B=e.style,U=(0,o.default)(e,g),F=t;t||!D&&!T||(F=D?"selectable":"removable");var W,V,H="selectable"===F,j="removable"===F,K=(0,p.usePlatform)(),z=(0,h.useDraggable)({onDragFinish:w}),G=z.dragging,q=z.rootElRef,Y=(0,o.default)(z,y),$=a.useContext(f.ListContext).toggleDrag;if(a.useEffect((function(){if(G)return $(!0),function(){return $(!1)}}),[G]),A&&(W=(0,i.createScopedElement)(m.CellDragger,(0,r.default)({vkuiClass:"Cell__dragger","aria-label":x},Y))),H){var X={name:I,value:k,onChange:O,defaultChecked:M,checked:R,disabled:S};V=(0,i.createScopedElement)(v.CellCheckbox,(0,r.default)({vkuiClass:"Cell__checkbox"},X))}var Q=A&&!H||j||S,J=!Q&&!G,Z=(0,s.classNames)((0,l.getClassName)("Cell",K),{"Cell--dragging":G,"Cell--removable":j,"Cell--selectable":H,"Cell--disabled":S}),ee=(0,i.createScopedElement)(d.default,(0,r.default)({hasActive:J,hasHover:J},U,{vkuiClass:"Cell__content",disabled:Q,Component:H?"label":P,before:(0,i.createScopedElement)(a.Fragment,null,A&&(K===u.ANDROID||K===u.VKCOM)&&W,H&&V,b),after:(0,i.createScopedElement)(a.Fragment,null,A&&K===u.IOS&&W,C)}));return j?(0,i.createScopedElement)(_.Removable,{vkuiClass:Z,className:N,style:B,getRootRef:q,removePlaceholder:E,onRemove:function(e){return n(e,null==q?void 0:q.current)}},ee):(0,i.createScopedElement)("div",{vkuiClass:Z,className:N,style:B,ref:q},ee)})},190071:(e,t,n)=>{"use strict";n.d(t,{CellCheckbox:()=>f});var r=n(300975),o=n(243835),i=n(735567),a=n(676750),s=n(237432),c=n(618858),l=n(482792),u=n(780778),d=n(119360),_=n(93781),p=n(108681),h=["className","style"],f=function(e){var t=e.className,n=e.style,f=(0,o.default)(e,h),m=(0,d.usePlatform)(),v=m===p.ANDROID?a.default:s.default,g=m===p.ANDROID?c.default:l.default;return(0,i.createScopedElement)("div",{vkuiClass:(0,_.classNames)((0,u.getClassName)("CellCheckbox",m)),className:t,style:n},(0,i.createScopedElement)("input",(0,r.default)({vkuiClass:"CellCheckbox__input",type:"checkbox"},f)),(0,i.createScopedElement)(v,{vkuiClass:"CellCheckbox__icon CellCheckbox__icon--off"}),(0,i.createScopedElement)(g,{vkuiClass:"CellCheckbox__icon CellCheckbox__icon--on"}))}},836161:(e,t,n)=>{"use strict";n.d(t,{CellDragger:()=>f});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(572960),c=n(522429),l=n(780778),u=n(119360),d=n(93781),_=n(108681),p=n(763029),h=["onDragStart","onDragMove","onDragEnd"],f=function(e){var t=e.onDragStart,n=e.onDragMove,f=e.onDragEnd,m=(0,o.default)(e,h),v=(0,u.usePlatform)(),g=a.useCallback((function(e){e.preventDefault()}),[]);return(0,i.createScopedElement)(p.Touch,(0,r.default)({vkuiClass:(0,d.classNames)((0,l.getClassName)("CellDragger",v)),onStart:t,onMoveY:n,onEnd:f,onClick:g},m),v===_.IOS?(0,i.createScopedElement)(s.default,null):(0,i.createScopedElement)(c.default,null))}},912518:(e,t,n)=>{"use strict";n.d(t,{useDraggable:()=>a});var r=n(239626),o=n(46008),i=n(667294),a=function(e){var t=e.onDragFinish,n=i.useState(!1),a=(0,o.default)(n,2),s=a[0],c=a[1],l=i.useRef(null),u=i.useState(void 0),d=(0,o.default)(u,2),_=d[0],p=d[1],h=i.useState(void 0),f=(0,o.default)(h,2),m=f[0],v=f[1],g=i.useState(void 0),y=(0,o.default)(g,2),E=y[0],w=y[1],b=i.useState(0),C=(0,o.default)(b,2),S=C[0],T=C[1],A=i.useState(void 0),D=(0,o.default)(A,2),P=D[0],O=D[1];return{onDragStart:function(){var e=l.current;c(!0);var t=(0,r.default)(e.parentElement.childNodes),n=t.indexOf(e);v(n),w(n),p(t),T(0)},onDragMove:function(e){e.originalEvent.preventDefault();var t=l.current;t.style.transform="translateY(".concat(e.shiftY,"px)");var n=t.getBoundingClientRect();O(S-e.shiftY<0?"down":"up"),T(e.shiftY),w(m),_.forEach((function(e,t){var r=e.getBoundingClientRect(),o=r.height/2,i=n.bottom>r.top+o,a=n.top<r.bottom-o;m<t?(i&&("down"===P&&(e.style.transform="translateY(-100%)"),w((function(e){return e+1}))),a&&"up"===P&&(e.style.transform="translateY(0)")):m>t&&(a&&("up"===P&&(e.style.transform="translateY(100%)"),w((function(e){return e-1}))),i&&"down"===P&&(e.style.transform="translateY(0)"))}))},onDragEnd:function(){var e=m,n=E;_.forEach((function(e){e.style.transform=null})),p(void 0),w(void 0),v(void 0),O(void 0),T(void 0),c(!1),t&&t({from:e,to:n})},dragging:s,rootElRef:l}}},935563:(e,t,n)=>{"use strict";n.d(t,{CellButton:()=>_});var r=n(300975),o=n(939844),i=n(243835),a=n(735567),s=n(780778),c=n(93781),l=n(119360),u=n(426305),d=["centered","mode"],_=function(e){var t=e.centered,n=void 0!==t&&t,_=e.mode,p=void 0===_?"primary":_,h=(0,i.default)(e,d),f=(0,l.usePlatform)();return(0,a.createScopedElement)(u.default,(0,r.default)({stopPropagation:!0},h,{vkuiClass:(0,c.classNames)((0,s.getClassName)("CellButton",f),"CellButton--".concat(p),(0,o.default)({},"CellButton--centered",n))}))}},387130:(e,t,n)=>{"use strict";n.d(t,{default:()=>E});var r=n(300975),o=n(243835),i=n(735567),a=n(795281),s=n(780778),c=n(93781),l=n(108681),u=n(418166),d=n(618858),_=n(541800),p=n(676750),h=n(119360),f=n(362276),m=n(672705),v=n(455833),g=n(115446),y=["children","className","style","getRootRef","getRef","sizeY"];const E=(0,m.withAdaptivity)((function(e){var t=e.children,n=e.className,m=e.style,E=e.getRootRef,w=e.getRef,b=e.sizeY,C=(0,o.default)(e,y),S=(0,h.usePlatform)(),T=S===l.VKCOM||b===f.SizeType.COMPACT?v.default:g.default;return(0,i.createScopedElement)(a.default,{Component:"label",vkuiClass:(0,c.classNames)((0,s.getClassName)("Checkbox",S),"Checkbox--sizeY-".concat(b)),className:n,style:m,disabled:C.disabled,activeEffectDelay:S===l.IOS?100:a.ACTIVE_EFFECT_DELAY,getRootRef:E},(0,i.createScopedElement)("input",(0,r.default)({},C,{type:"checkbox",vkuiClass:"Checkbox__input",ref:w})),(0,i.createScopedElement)("div",{vkuiClass:"Checkbox__container"},(0,i.createScopedElement)("div",{vkuiClass:"Checkbox__icon Checkbox__icon--on"},b===f.SizeType.COMPACT||S===l.VKCOM?(0,i.createScopedElement)(u.default,null):(0,i.createScopedElement)(d.default,null)),(0,i.createScopedElement)("div",{vkuiClass:"Checkbox__icon Checkbox__icon--off"},b===f.SizeType.COMPACT||S===l.VKCOM?(0,i.createScopedElement)(_.default,null):(0,i.createScopedElement)(p.default,null)),(0,i.createScopedElement)(T,{weight:"regular",vkuiClass:"Checkbox__content"},t)))}),{sizeY:!0})},973007:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(394478),c=n(256631),l=n(93781),u=n(443910),d=n(795281),_=["value","option","removable","onRemove","removeAriaLabel","before","after","children"];const p=function(e){var t=e.value,n=void 0===t?"":t,p=(e.option,e.removable),h=void 0===p||p,f=e.onRemove,m=void 0===f?c.noop:f,v=e.removeAriaLabel,g=void 0===v?"Удалить":v,y=e.before,E=void 0===y?null:y,w=e.after,b=e.children,C=(0,o.default)(e,_),S=a.useCallback((function(e){m(e,n)}),[m,n]),T=(0,c.getTitleFromChildren)(b);return(0,i.createScopedElement)("div",(0,r.default)({vkuiClass:(0,l.classNames)("Chip",{"Chip--removable":h}),role:"option","aria-label":T},C),(0,i.createScopedElement)("div",{vkuiClass:"Chip__in",role:"presentation"},(0,c.hasReactNode)(E)&&(0,i.createScopedElement)("div",{vkuiClass:"Chip__before"},E),(0,i.createScopedElement)(u.default,{level:"1",weight:"regular",vkuiClass:"Chip__content",title:T,"aria-hidden":"true"},b),(0,c.hasReactNode)(w)&&(0,i.createScopedElement)("div",{vkuiClass:"Chip__after"},w),h&&(0,i.createScopedElement)(d.default,{Component:"button",vkuiClass:"Chip__remove",onClick:S,hasHover:!1,hasActive:!1,"aria-label":"".concat(g," ").concat(T)},(0,i.createScopedElement)(s.default,{"aria-hidden":!0}))))}},517466:(e,t,n)=>{"use strict";n.d(t,{chipsInputDefaultProps:()=>E,default:()=>w});var r=n(300975),o=n(38429),i=n(46008),a=n(243835),s=n(735567),c=n(667294),l=n(937188),u=n(93781),d=n(973007),_=n(256631),p=n(174909),h=n(324285),f=n(905017),m=n(428253),v=["style","value","onChange","onInputChange","onKeyDown","onBlur","onFocus","children","className","inputValue","getRef","getRootRef","placeholder","getOptionValue","getOptionLabel","getNewOptionData","renderChip","after","inputAriaLabel"],g=["disabled","value","label"],y=function(e){var t=e.style,n=(e.value,e.onChange,e.onInputChange,e.onKeyDown),d=e.onBlur,_=e.onFocus,g=(e.children,e.className),y=(e.inputValue,e.getRef),E=e.getRootRef,w=e.placeholder,b=e.getOptionValue,C=e.getOptionLabel,S=(e.getNewOptionData,e.renderChip),T=e.after,A=e.inputAriaLabel,D=(0,a.default)(e,v),P=(0,h.useAdaptivity)().sizeY,O=c.useState(!1),I=(0,i.default)(O,2),k=I[0],R=I[1],M=(0,p.useChipsInput)(e),L=M.fieldValue,x=M.addOptionFromInput,N=M.removeOption,B=M.selectedOptions,U=M.handleInputChange,F=(0,m.useExternRef)(y),W=D.disabled||D.readOnly,V=function(e,t){N(t)};return(0,s.createScopedElement)(l.FormField,{getRootRef:E,vkuiClass:(0,u.classNames)("ChipsInput","ChipsInput--sizeY-".concat(P),{"ChipsInput--focused":k,"ChipsInput--withChips":!!B.length}),className:g,style:t,disabled:D.disabled,after:T,onClick:function(e){W?e.preventDefault():null===(null==F?void 0:F.current)||k||F.current.focus()},role:"application","aria-disabled":D.disabled,"aria-readonly":D.readOnly},(0,s.createScopedElement)("div",{vkuiClass:"ChipsInput__container",role:"presentation"},B.map((function(e){var t=b(e),n=C(e);return(0,s.createScopedElement)(c.Fragment,{key:"".concat((0,o.default)(t),"-").concat(t)},S({option:e,value:t,label:n,onRemove:V,disabled:D.disabled,className:(0,f.prefixClass)("ChipsInput__chip")}))})),(0,s.createScopedElement)("label",{vkuiClass:"ChipsInput__input-container","aria-label":A},(0,s.createScopedElement)("input",(0,r.default)({ref:F,value:L,autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",vkuiClass:"ChipsInput__el",onChange:U,onKeyDown:function(e){W?e.preventDefault():(n(e),"Backspace"!==e.key||e.defaultPrevented||L||!B.length||(N(b(B[B.length-1])),e.preventDefault()),"Enter"===e.key&&!e.defaultPrevented&&L&&(x(),e.preventDefault()))},onFocus:function(e){k||R(!0),_(e)},onBlur:function(e){k&&R(!1),d(e)},placeholder:B.length?null:w},D)))))},E={type:"text",onChange:_.noop,onInputChange:_.noop,onKeyDown:_.noop,onBlur:_.noop,onFocus:_.noop,value:[],inputValue:"",inputAriaLabel:"Введите ваше значение...",getOptionValue:function(e){return e.value},getOptionLabel:function(e){return e.label},getNewOptionData:function(e,t){return{value:t,label:t}},renderChip:function(e){var t=e.disabled,n=e.value,o=e.label,i=(0,a.default)(e,g);return(0,s.createScopedElement)(d.default,(0,r.default)({value:n,removable:!t},i),o)}};y.defaultProps=E;const w=y},174909:(e,t,n)=>{"use strict";n.d(t,{useChipsInput:()=>i});var r=n(46008),o=n(667294),i=function(e){var t=e.value,n=e.getOptionValue,i=e.onChange,a=e.onInputChange,s=e.getNewOptionData,c=o.useState(e.inputValue),l=(0,r.default)(c,2),u=l[0],d=l[1],_=o.useState(t),p=(0,r.default)(_,2),h=p[0],f=p[1],m=o.useCallback((function(){d(""),a({target:{value:""}})}),[a]),v=o.useCallback((function(e){d(e.target.value),a(e)}),[a]),g=o.useCallback((function(e,t){var r=h.filter((function(t){return n(e)!==n(t)}));!0===t&&r.push(e),f(r),i(r)}),[h,n,i]),y=o.useCallback((function(e){return g(e,!0)}),[g]),E=o.useCallback((function(){var e=null==u?void 0:u.trim();e&&(y(s(void 0,e)),m())}),[y,m,s,u]),w=o.useCallback((function(e){g(s(void 0,e),!1)}),[g,s]);return o.useEffect((function(){return f(t),function(){return f([])}}),[e.value]),o.useEffect((function(){return d(e.inputValue),function(){return d("")}}),[e.inputValue]),{fieldValue:u,setFieldValue:d,selectedOptions:h,setSelectedOptions:f,clearInput:m,toggleOption:g,addOption:y,addOptionFromInput:E,removeOption:w,handleInputChange:v}}},601514:(e,t,n)=>{"use strict";n.d(t,{default:()=>y});var r=n(309919),o=n(243835),i=n(46008),a=n(735567),s=n(667294),c=n(962557),l=n(181498),u=n(766351),d=n(108681),_=n(214542),p=n(854193),h=n(256631),f=n(644029),m=["children","schemeTarget"];(0,f.warnOnce)("ConfigProvider");var v=function(e){return e===u.Scheme.SPACE_GRAY||e===u.Scheme.VKCOM_DARK?"dark":"light"};var g=function(e){var t=e.children,n=e.schemeTarget,f=(0,o.default)(e,m),g=function(e,t){if("inherit"===e)return e;if(e===u.Scheme.VKCOM)return u.Scheme.VKCOM_LIGHT;if(t===d.VKCOM&&(e===u.Scheme.BRIGHT_LIGHT||e===u.Scheme.SPACE_GRAY))return u.Scheme.VKCOM_LIGHT;switch(e){case u.Scheme.DEPRECATED_CLIENT_LIGHT:return u.Scheme.BRIGHT_LIGHT;case u.Scheme.DEPRECATED_CLIENT_DARK:return u.Scheme.SPACE_GRAY;default:return e}}(f.scheme,f.platform),y=(0,l.useDOM)().document,E=n||(null==y?void 0:y.body);(0,_.useIsomorphicLayoutEffect)((function(){return"inherit"===g?h.noop:(E.setAttribute("scheme",g),function(){return E.removeAttribute("scheme")})}),[g]);var w,b,C,S,T,A,D,P,O=(w=E,C="inherit"===(b=g),S=function(){if(C&&c.canUseDOM)return w.getAttribute("scheme")},T=s.useState(S()),A=(0,i.default)(T,2),D=A[0],P=A[1],s.useEffect((function(){if(!C)return h.noop;P(S());var e=new MutationObserver((function(){return P(S())}));return e.observe(w,{attributes:!0,attributeFilter:["scheme"]}),function(){return e.disconnect()}}),[C]),"inherit"===b?D:b),I=(0,p.useObjectMemo)((0,r.default)({appearance:v(O)},f));return(0,a.createScopedElement)(u.ConfigProviderContext.Provider,{value:I},t)};g.defaultProps=(0,r.default)({},u.defaultConfigProviderProps);const y=g},766351:(e,t,n)=>{"use strict";n.d(t,{Appearance:()=>r,Scheme:()=>o,WebviewType:()=>i,defaultConfigProviderProps:()=>u,ConfigProviderContext:()=>d});var r,o,i,a=n(667294),s=n(363476),c=n.n(s),l=n(108681);!function(e){e.DARK="dark",e.LIGHT="light"}(r||(r={})),function(e){e.DEPRECATED_CLIENT_LIGHT="client_light",e.DEPRECATED_CLIENT_DARK="client_dark",e.VKCOM="vkcom",e.BRIGHT_LIGHT="bright_light",e.SPACE_GRAY="space_gray",e.VKCOM_LIGHT="vkcom_light",e.VKCOM_DARK="vkcom_dark"}(o||(o={})),function(e){e.VKAPPS="vkapps",e.INTERNAL="internal"}(i||(i={}));var u={webviewType:i.VKAPPS,isWebView:c().isWebView(),scheme:o.BRIGHT_LIGHT,transitionMotionEnabled:!0,platform:(0,l.platform)()},d=a.createContext(u)},582164:(e,t,n)=>{"use strict";n.d(t,{default:()=>m});var r=n(300975),o=n(243835),i=n(735567),a=n(138590),s=n(443910),c=n(931252),l=n(455833),u=n(795281),d=n(780778),_=n(119360),p=n(256631),h=["subtitle","header","text","caption","className","mode","style","getRootRef","getRef","maxHeight","image","src","srcSet","alt","width","height","crossOrigin","decoding","loading","referrerPolicy","sizes","useMap"],f=function(e){var t=e.subtitle,n=e.header,f=e.text,m=e.caption,v=e.className,g=e.mode,y=e.style,E=e.getRootRef,w=e.getRef,b=e.maxHeight,C=e.image,S=e.src,T=e.srcSet,A=e.alt,D=(e.width,e.height),P=e.crossOrigin,O=e.decoding,I=e.loading,k=e.referrerPolicy,R=e.sizes,M=e.useMap,L=(0,o.default)(e,h),x=(0,_.usePlatform)(),N=L.disabled||"function"!=typeof L.onClick,B=C||S;return(0,i.createScopedElement)(a.default,{mode:g,getRootRef:E,vkuiClass:(0,d.getClassName)("ContentCard",x),style:y,className:v},(0,i.createScopedElement)(u.default,(0,r.default)({},L,{disabled:N,vkuiClass:"ContentCard__tappable"}),(B||T)&&(0,i.createScopedElement)("img",{ref:w,vkuiClass:"ContentCard__img",src:B,srcSet:T,alt:A,crossOrigin:P,decoding:O,loading:I,referrerPolicy:k,sizes:R,useMap:M,height:D,style:{maxHeight:b},width:"100%"}),(0,i.createScopedElement)("div",{vkuiClass:"ContentCard__body"},(0,p.hasReactNode)(t)&&(0,i.createScopedElement)(s.default,{caps:!0,vkuiClass:"ContentCard__text",weight:"semibold",level:"3"},t),(0,p.hasReactNode)(n)&&(0,i.createScopedElement)(c.default,{vkuiClass:"ContentCard__text",weight:"semibold",level:"3"},n),(0,p.hasReactNode)(f)&&(0,i.createScopedElement)(l.default,{vkuiClass:"ContentCard__text",weight:"regular"},f),(0,p.hasReactNode)(m)&&(0,i.createScopedElement)(s.default,{vkuiClass:"ContentCard__text",weight:"regular",level:"1"},m))))};f.defaultProps={mode:"shadow"};const m=f},643831:(e,t,n)=>{"use strict";n.d(t,{default:()=>g});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(93781),c=n(780778),l=n(119360),u=n(443910),d=n(455833),_=n(108681),p=n(256631),h=["size","platform"],f=["mode","size","children"],m=function(e){var t=e.size,n=e.platform,a=(0,o.default)(e,h);return"s"===t?(0,i.createScopedElement)(u.default,(0,r.default)({level:"2",weight:n===_.VKCOM?"medium":"regular"},a)):(0,i.createScopedElement)(d.default,(0,r.default)({weight:"medium"},a))},v=function(e){var t=e.mode,n=e.size,u=e.children,d=(0,o.default)(e,f),_=(0,l.usePlatform)();return 0===a.Children.count(u)?null:(0,i.createScopedElement)("span",(0,r.default)({},d,{vkuiClass:(0,s.classNames)((0,c.getClassName)("Counter",_),"Counter--".concat(t),"Counter--s-".concat(n))}),(0,p.hasReactNode)(u)&&(0,i.createScopedElement)(m,{platform:_,size:n,vkuiClass:"Counter__in"},u))};v.defaultProps={mode:"secondary",size:"m"};const g=a.memo(v)},803265:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(640137),o=n(101226),i=n(171178),a=n(351475),s=n(682754),c=n(939844),l=n(735567),u=n(667294),d=n(181498),_=n(256631),p=function(e){(0,a.default)(n,e);var t=(0,s.default)(n);function n(){var e;(0,r.default)(this,n);for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return e=t.call.apply(t,[this].concat(a)),(0,c.default)((0,i.default)(e),"ratio",NaN),(0,c.default)((0,i.default)(e),"lastTrackerTop",0),(0,c.default)((0,i.default)(e),"clientHeight",0),(0,c.default)((0,i.default)(e),"trackerHeight",0),(0,c.default)((0,i.default)(e),"scrollHeight",0),(0,c.default)((0,i.default)(e),"transformProp",""),(0,c.default)((0,i.default)(e),"startY",0),(0,c.default)((0,i.default)(e),"trackerTop",0),(0,c.default)((0,i.default)(e),"box",(0,_.multiRef)((function(t){return(0,_.setRef)(t,e.props.boxRef)}))),(0,c.default)((0,i.default)(e),"barY",u.createRef()),(0,c.default)((0,i.default)(e),"trackerY",u.createRef()),(0,c.default)((0,i.default)(e),"resize",(function(){var t=e.box.current.clientHeight,n=e.box.current.scrollHeight,r=t/n,o=Math.max(t*r,40);e.ratio=r,e.clientHeight=t,e.scrollHeight=n,e.trackerHeight=o,r>=1?e.barY.current.style.display="none":(e.barY.current.style.display="",e.trackerY.current.style.height="".concat(o,"px"),e.setTrackerPositionFromScroll(e.box.current.scrollTop))})),(0,c.default)((0,i.default)(e),"scroll",(function(){e.ratio>=1||e.setTrackerPositionFromScroll(e.box.current.scrollTop)})),(0,c.default)((0,i.default)(e),"onDragStart",(function(t){t.preventDefault(),e.startY=t.clientY,e.trackerTop=e.lastTrackerTop,e.props.document.addEventListener("mousemove",e.onMove),e.props.document.addEventListener("mouseup",e.onUp)})),(0,c.default)((0,i.default)(e),"onMove",(function(t){t.preventDefault();var n=t.clientY-e.startY,r=Math.min(Math.max(e.trackerTop+n,0),e.clientHeight-e.trackerHeight);e.setScrollPositionFromTracker(r)})),(0,c.default)((0,i.default)(e),"onUp",(function(t){t.preventDefault(),e.props.document.removeEventListener("mousemove",e.onMove),e.props.document.removeEventListener("mouseup",e.onUp)})),e}return(0,o.default)(n,[{key:"componentDidMount",value:function(){this.chooseTransformProp(),this.resize(),this.props.windowResize&&this.props.window.addEventListener("resize",this.resize)}},{key:"componentDidUpdate",value:function(){this.resize()}},{key:"componentWillUnmount",value:function(){this.props.window.removeEventListener("resize",this.resize)}},{key:"chooseTransformProp",value:function(){var e=this.trackerY.current.style,t="";"transform"in e?t="transform":"webkitTransform"in e&&(t="webkitTransform"),this.transformProp=t}},{key:"setTrackerPosition",value:function(e){this.lastTrackerTop=e,this.trackerY.current.style[this.transformProp]="translate(0, ".concat(e,"px)")}},{key:"setTrackerPositionFromScroll",value:function(e){var t=e/(this.scrollHeight-this.clientHeight);this.setTrackerPosition((this.clientHeight-this.trackerHeight)*t)}},{key:"setScrollPositionFromTracker",value:function(e){var t=e/(this.clientHeight-this.trackerHeight);this.box.current.scrollTop=(this.scrollHeight-this.clientHeight)*t}},{key:"render",value:function(){return(0,l.createScopedElement)("div",{vkuiClass:"CustomScrollView"},(0,l.createScopedElement)("div",{vkuiClass:"CustomScrollView__barY",ref:this.barY},(0,l.createScopedElement)("div",{vkuiClass:"CustomScrollView__trackerY",ref:this.trackerY,onMouseDown:this.onDragStart})),(0,l.createScopedElement)("div",{vkuiClass:"CustomScrollView__box",tabIndex:-1,ref:this.box,onScroll:this.scroll},this.props.children))}}]),n}(u.Component);const h=(0,d.withDOM)(p)},836931:(e,t,n)=>{"use strict";n.d(t,{default:()=>M});var r=n(300975),o=n(243835),i=n(640137),a=n(101226),s=n(171178),c=n(351475),l=n(682754),u=n(939844),d=(n(38429),n(735567)),_=n(667294),p=n(751467),h=n(256631),f=n(93781),m=n(803265),v=n(672705),g=n(212602),y=n(596002),E=n(780778),w=n(383567),b=n(91742),C=n(443910),S=n(644029),T=n(474353),A=n(221501),D=n(921923),P=["searchable","name","className","getRef","getRootRef","popupDirection","options","sizeY","platform","style","onChange","onBlur","onFocus","onClick","renderOption","children","emptyText","onInputChange","filterFn","renderDropdown","onOpen","onClose","fetching"],O=["option"],I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return t>=e.length-1?-1:e.findIndex((function(e,n){return n>t&&!e.disabled}))},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length,n=-1;if(t<=0)return n;for(var r=t-1;r>=0;r--){var o=e[r];if(!o.disabled){n=r;break}}return n},R=((0,S.warnOnce)("CustomSelect"),function(e){(0,c.default)(n,e);var t=(0,l.default)(n);function n(e){var r;(0,i.default)(this,n),r=t.call(this,e),(0,u.default)((0,s.default)(r),"keyboardInput",void 0),(0,u.default)((0,s.default)(r),"isControlledOutside",void 0),(0,u.default)((0,s.default)(r),"selectEl",void 0),(0,u.default)((0,s.default)(r),"scrollBoxRef",_.createRef()),(0,u.default)((0,s.default)(r),"resetKeyboardInput",(function(){r.keyboardInput=""})),(0,u.default)((0,s.default)(r),"getSelectedItem",(function(){var e=r.state,t=e.selectedOptionIndex,n=e.options;return n.length?n[t]:null})),(0,u.default)((0,s.default)(r),"filter",(function(e,t,n){return"function"==typeof n?e.filter((function(e){return n(t,e)})):e})),(0,u.default)((0,s.default)(r),"open",(function(){r.setState((function(e){return{opened:!0,focusedOptionIndex:e.selectedOptionIndex}}),(function(){var e=r.state.selectedOptionIndex;r.isValidIndex(e)&&r.scrollToElement(e,!0)})),"function"==typeof r.props.onOpen&&r.props.onOpen()})),(0,u.default)((0,s.default)(r),"close",(function(){r.resetKeyboardInput(),r.setState((function(){return{inputValue:"",opened:!1,focusedOptionIndex:-1,options:r.props.options}})),"function"==typeof r.props.onClose&&r.props.onClose()})),(0,u.default)((0,s.default)(r),"selectFocused",(function(){var e=r.state.focusedOptionIndex;r.select(e)})),(0,u.default)((0,s.default)(r),"select",(function(e){if(r.isValidIndex(e)){var t=r.state.options[e];r.setState({nativeSelectValue:t.value},(function(){var e=new Event("change",{bubbles:!0});r.selectEl.dispatchEvent(e)})),r.close()}})),(0,u.default)((0,s.default)(r),"onClick",(function(){r.state.opened?r.close():r.open()})),(0,u.default)((0,s.default)(r),"onFocus",(function(){var e=new Event("focus");r.selectEl.dispatchEvent(e)})),(0,u.default)((0,s.default)(r),"onBlur",(function(){r.close();var e=new Event("blur");r.selectEl.dispatchEvent(e)})),(0,u.default)((0,s.default)(r),"focusOptionByIndex",(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!(e<0||e>r.state.options.length-1)){var n=r.state.options[e];n.disabled||(t&&r.scrollToElement(e),r.setState((function(){return{focusedOptionIndex:e}})))}})),(0,u.default)((0,s.default)(r),"focusOption",(function(e){var t=r.state.focusedOptionIndex;if("next"===e){var n=I(r.state.options,t);t=-1===n?I(r.state.options):n}else if("prev"===e){var o=k(r.state.options,t);t=-1===o?k(r.state.options):o}r.focusOptionByIndex(t)})),(0,u.default)((0,s.default)(r),"handleOptionHover",(function(e){r.focusOptionByIndex(Array.prototype.indexOf.call(e.currentTarget.parentNode.children,e.currentTarget),!1)})),(0,u.default)((0,s.default)(r),"handleOptionDown",(function(e){e.preventDefault()})),(0,u.default)((0,s.default)(r),"handleOptionClick",(function(e){var t=Array.prototype.indexOf.call(e.currentTarget.parentNode.children,e.currentTarget),n=r.state.options[t];n&&!n.disabled&&r.selectFocused()})),(0,u.default)((0,s.default)(r),"resetFocusedOption",(function(){r.setState({focusedOptionIndex:-1})})),(0,u.default)((0,s.default)(r),"onKeyboardInput",(function(e){var t=r.keyboardInput+e,n=r.state.options.findIndex((function(e){return e.label.toLowerCase().includes(t)}));n>-1&&r.focusOptionByIndex(n),r.keyboardInput=t})),(0,u.default)((0,s.default)(r),"onLabelClick",(function(e){var t;null!==(t=r.scrollBoxRef.current)&&void 0!==t&&t.contains(e.target)&&e.preventDefault()})),(0,u.default)((0,s.default)(r),"onNativeSelectChange",(function(e){var t=e.currentTarget.value;r.isControlledOutside||r.setState({selectedOptionIndex:r.findSelectedIndex(r.state.options,t)}),r.props.onChange&&r.props.onChange(e)})),(0,u.default)((0,s.default)(r),"onInputChange",(function(e){if(r.props.onInputChange){var t=r.props.onInputChange(e,r.props.options);t?r.setState({options:t,selectedOptionIndex:r.findSelectedIndex(t,r.state.nativeSelectValue),inputValue:e.target.value}):r.setState({inputValue:e.target.value})}else{var n=r.filter(r.props.options,e.target.value,r.props.filterFn);r.setState({options:n,selectedOptionIndex:r.findSelectedIndex(n,r.state.nativeSelectValue),inputValue:e.target.value})}})),(0,u.default)((0,s.default)(r),"onInputKeyDown",(function(e){switch(["ArrowUp","ArrowDown","Escape","Enter"].includes(e.key)&&r.areOptionsShown&&e.preventDefault(),e.key){case"ArrowUp":r.areOptionsShown&&r.focusOption("prev");break;case"ArrowDown":r.areOptionsShown&&r.focusOption("next");break;case"Escape":r.close();break;case"Enter":r.areOptionsShown&&r.selectFocused()}})),(0,u.default)((0,s.default)(r),"handleKeyDownSelect",(function(e){var t=r.state.opened;if(1!==e.key.length||" "===e.key)switch(["ArrowUp","ArrowDown","Escape","Enter"].includes(e.key)&&r.areOptionsShown&&e.preventDefault(),e.key){case"ArrowUp":t?r.areOptionsShown&&r.focusOption("prev"):r.open();break;case"ArrowDown":t?r.areOptionsShown&&r.focusOption("next"):r.open();break;case"Escape":r.close();break;case"Enter":case"Spacebar":case" ":t?r.areOptionsShown&&r.selectFocused():r.open()}else r.onKeyboardInput(e.key)})),(0,u.default)((0,s.default)(r),"handleKeyUp",(0,h.debounce)(r.resetKeyboardInput,1e3)),(0,u.default)((0,s.default)(r),"renderOption",(function(e,t){var n=r.state,o=n.focusedOptionIndex,i=n.selectedOptionIndex,a=r.props.renderOption,s=t===o,c=t===i;return(0,d.createScopedElement)(_.Fragment,{key:"".concat(e.value)},a({option:e,hovered:s,children:e.label,selected:c,disabled:e.disabled,onClick:r.handleOptionClick,onMouseDown:r.handleOptionDown,onMouseEnter:r.handleOptionHover}))})),(0,u.default)((0,s.default)(r),"selectRef",(function(e){r.selectEl=e,(0,h.setRef)(e,r.props.getRef)}));var o=e.value,a=e.defaultValue,c=void 0!==o?o:a;return r.keyboardInput="",r.state={opened:!1,focusedOptionIndex:-1,selectedOptionIndex:r.findSelectedIndex(e.options,c),nativeSelectValue:c,options:e.options,inputValue:""},void 0!==e.value&&(r.isControlledOutside=!0),r}return(0,a.default)(n,[{key:"areOptionsShown",get:function(){return null!==this.scrollBoxRef.current}},{key:"findSelectedIndex",value:function(e,t){return e.findIndex((function(e){return t="number"==typeof e.value?Number(t):t,e.value===t}))}},{key:"isValidIndex",value:function(e){return e>=0&&e<this.state.options.length}},{key:"scrollToElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.scrollBoxRef.current,r=n?n.children[e]:null;if(r){var o=n.offsetHeight,i=n.scrollTop,a=r.offsetTop,s=r.offsetHeight;t?n.scrollTop=a-o/2+s/2:a+s>o+i?n.scrollTop=a-o+s:a<i&&(n.scrollTop=a)}}},{key:"componentDidUpdate",value:function(e){if(!(0,D.is)(e.value,this.props.value)||e.options!==this.props.options){0,this.isControlledOutside=void 0!==this.props.value;var t=void 0===this.props.value?this.state.nativeSelectValue:this.props.value,n=this.props.searchable?this.filter(this.props.options,this.state.inputValue,this.props.filterFn):this.props.options;this.setState({nativeSelectValue:t,selectedOptionIndex:this.findSelectedIndex(n,t),options:n})}}},{key:"render",value:function(){var e,t=this.state,n=t.opened,i=t.nativeSelectValue,a=this.props,s=a.searchable,c=a.name,l=a.className,u=(a.getRef,a.getRootRef),_=a.popupDirection,h=a.options,v=a.sizeY,g=a.platform,y=a.style,S=(a.onChange,a.onBlur),A=a.onFocus,D=a.onClick,O=(a.renderOption,a.children,a.emptyText,a.onInputChange,a.filterFn,a.renderDropdown),I=(a.onOpen,a.onClose,a.fetching),k=(0,o.default)(a,P),R=this.getSelectedItem(),M=R?R.label:void 0,L=(0,d.createScopedElement)(m.default,{boxRef:this.scrollBoxRef},this.state.options.map(this.renderOption),0===this.state.options.length&&(0,d.createScopedElement)(C.default,{level:"1",weight:"regular",vkuiClass:"CustomSelect__empty"},this.props.emptyText));return e="function"==typeof O?O({defaultDropdownContent:L}):I?(0,d.createScopedElement)("div",{vkuiClass:"CustomSelect__fetching"},(0,d.createScopedElement)(T.default,{size:"small"})):L,(0,d.createScopedElement)("label",{vkuiClass:(0,E.getClassName)("CustomSelect",g),className:l,style:y,ref:u,onClick:this.onLabelClick},n&&s?(0,d.createScopedElement)(w.default,(0,r.default)({},k,{autoFocus:!0,onBlur:this.onBlur,vkuiClass:(0,f.classNames)({CustomSelect__open:n,"CustomSelect__open--popupDirectionTop":"top"===_}),value:this.state.inputValue,onKeyDown:this.onInputKeyDown,onChange:this.onInputChange,onClick:D,after:(0,d.createScopedElement)(b.DropdownIcon,null),placeholder:k.placeholder})):(0,d.createScopedElement)(p.default,(0,r.default)({},k,{"aria-hidden":!0,onClick:this.onClick,onKeyDown:this.handleKeyDownSelect,onKeyUp:this.handleKeyUp,onFocus:this.onFocus,onBlur:this.onBlur,vkuiClass:(0,f.classNames)({CustomSelect__open:n,"CustomSelect__open--popupDirectionTop":"top"===_})}),M),(0,d.createScopedElement)("select",{ref:this.selectRef,name:c,onChange:this.onNativeSelectChange,onBlur:S,onFocus:A,onClick:D,value:i,"aria-hidden":!0,vkuiClass:"CustomSelect__control"},h.map((function(e){return(0,d.createScopedElement)("option",{key:"".concat(e.value),value:e.value})}))),n&&(0,d.createScopedElement)("div",{vkuiClass:(0,f.classNames)("CustomSelect__options","CustomSelect__options--sizeY-".concat(v),{"CustomSelect__options--popupDirectionTop":"top"===_}),onMouseLeave:this.resetFocusedOption},e))}}]),n}(_.Component));(0,u.default)(R,"defaultProps",{searchable:!1,renderOption:function(e){e.option;var t=(0,o.default)(e,O);return(0,d.createScopedElement)(y.default,t)},options:[],emptyText:"Ничего не найдено",filterFn:A.defaultFilterFn});const M=(0,g.withPlatform)((0,v.withAdaptivity)(R,{sizeY:!0}))},596002:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(300975),o=n(243835),i=n(735567),a=n(416259),s=n(93781),c=n(256631),l=n(455833),u=n(443910),d=n(324285),_=n(644029),p=["children","hovered","selected","before","after","option","description","disabled"];(0,_.warnOnce)("CustomSelectOption");const h=function(e){var t=e.children,n=e.hovered,_=e.selected,h=e.before,f=e.after,m=(e.option,e.description),v=e.disabled,g=(0,o.default)(e,p),y="string"==typeof t?t:null,E=(0,d.useAdaptivity)().sizeY;return(0,i.createScopedElement)(l.default,(0,r.default)({},g,{Component:"div",weight:"regular",role:"option",title:y,"aria-disabled":v,"aria-selected":_,vkuiClass:(0,s.classNames)("CustomSelectOption","CustomSelectOption--sizeY-".concat(E),{"CustomSelectOption--hover":n&&!v,"CustomSelectOption--selected":_,"CustomSelectOption--disabled":v})}),(0,c.hasReactNode)(h)&&(0,i.createScopedElement)("div",{vkuiClass:"CustomSelectOption__before"},h),(0,i.createScopedElement)("div",{vkuiClass:"CustomSelectOption__main"},(0,i.createScopedElement)("div",{vkuiClass:"CustomSelectOption__children"},t),(0,c.hasReactNode)(m)&&(0,i.createScopedElement)(u.default,{level:"1",weight:"regular",vkuiClass:"CustomSelectOption__description"},m)),(0,i.createScopedElement)("div",{vkuiClass:"CustomSelectOption__after"},(0,c.hasReactNode)(f)&&(0,i.createScopedElement)("div",{className:"CustomSelectOption__afterIn"},f),_&&(0,i.createScopedElement)(a.default,{vkuiClass:"CustomSelectOption__selectedIcon"})))}},891455:(e,t,n)=>{"use strict";n.d(t,{default:()=>C});var r=n(309919),o=n(46008),i=n(300975),a=n(939844),s=n(243835),c=n(735567),l=n(667294),u=n(383567),d=n(672705),_=n(256631),p=n(836931),h=["name","min","max","dayPlaceholder","monthPlaceholder","yearPlaceholder","popupDirection","defaultValue","hasMouse","monthNames","day","month","year","onDateChange","disabled"],f=["min","max","dayPlaceholder","monthPlaceholder","yearPlaceholder","popupDirection","defaultValue","hasMouse","day","month","year","onDateChange"],m=["hasMouse","defaultValue"],v=["Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря"];function g(e){var t=e.day,n=e.month,r=e.year;return"".concat(r,"-").concat((0,_.leadingZero)(n),"-").concat((0,_.leadingZero)(t))}var y=function(e,t){for(var n=e>t,r=[],o=Math.min(e,t);o<=Math.max(e,t);o++)r.push(o);return n?r.reverse():r},E=function(e){var t=e.name,n=e.min,r=e.max,o=e.dayPlaceholder,l=e.monthPlaceholder,u=e.yearPlaceholder,d=e.popupDirection,_=(e.defaultValue,e.hasMouse,e.monthNames),f=e.day,m=e.month,E=e.year,w=e.onDateChange,b=e.disabled,C=(0,s.default)(e,h),S=function(e){w((0,a.default)({day:f,month:m,year:E},e.target.name,Number(e.target.value)))},T=y(1,function(e,t){return e?new Date(t||2016,e,0).getDate():31}(m,E)).map((function(e){return{label:String(e),value:e}})),A=(_||v).map((function(e,t){return{label:e,value:t+1}})),D=y(r.year,n.year).map((function(e){return{label:String(e),value:e}}));return(0,c.createScopedElement)("div",(0,i.default)({vkuiClass:"DatePicker"},C),(0,c.createScopedElement)("div",{vkuiClass:"DatePicker__container"},(0,c.createScopedElement)("div",{vkuiClass:"DatePicker__day"},(0,c.createScopedElement)(p.default,{name:"day",value:f,options:T,placeholder:o,popupDirection:d,onChange:S,disabled:b})),(0,c.createScopedElement)("div",{vkuiClass:"DatePicker__month"},(0,c.createScopedElement)(p.default,{vkuiClass:"DatePicker__monthSelect",name:"month",value:m,options:A,placeholder:l,popupDirection:d,onChange:S,disabled:b})),(0,c.createScopedElement)("div",{vkuiClass:"DatePicker__year"},(0,c.createScopedElement)(p.default,{name:"year",value:E,options:D,placeholder:u,popupDirection:d,onChange:S,disabled:b}))),(0,c.createScopedElement)("input",{type:"hidden",name:t,value:g({day:f,month:m,year:E})}))},w=function(e){var t=e.min,n=e.max,r=(e.dayPlaceholder,e.monthPlaceholder,e.yearPlaceholder,e.popupDirection,e.defaultValue,e.hasMouse,e.day),o=e.month,a=e.year,d=e.onDateChange,_=(0,s.default)(e,f),p=r&&o&&a?{defaultValue:g({day:r,month:o,year:a})}:{},h=l.useCallback((function(e){var t,n;d((t=e.currentTarget.value,n=t.split("-"),{day:Number(n[2]),month:Number(n[1]),year:Number(n[0])}))}),[d]);return(0,c.createScopedElement)(u.default,(0,i.default)({},_,{type:"date",onChange:h,min:g(t),max:g(n)},p))},b=function(e){var t=e.hasMouse,n=e.defaultValue,a=(0,s.default)(e,m),u=l.useState((function(){return{day:(null==n?void 0:n.day)||0,month:(null==n?void 0:n.month)||0,year:(null==n?void 0:n.year)||0}})),d=(0,o.default)(u,2),_=d[0],p=d[1],h=l.useCallback((function(e){p(e),a.onDateChange&&a.onDateChange((0,r.default)({},e))}),[a.onDateChange]),f=t?E:w;return(0,c.createScopedElement)(f,(0,i.default)({},a,_,{onDateChange:h}))};b.defaultProps={min:{day:0,month:0,year:0},max:{day:31,month:12,year:2100}};const C=(0,d.withAdaptivity)(b,{hasMouse:!0})},457283:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(119360),c=["children","getRootRef"];const l=function(e){var t=e.children,n=e.getRootRef,l=(0,o.default)(e,c),u=(0,s.usePlatform)();return(0,i.createScopedElement)("div",(0,r.default)({},l,{ref:n,vkuiClass:(0,a.getClassName)("Div",u)}),t)}},91742:(e,t,n)=>{"use strict";n.d(t,{DropdownIcon:()=>d});var r=n(300975),o=n(735567),i=n(536741),a=n(105103),s=n(362276),c=n(780778),l=n(324285),u=n(119360),d=function(e){var t=(0,u.usePlatform)(),n=(0,l.useAdaptivity)().sizeY===s.SizeType.COMPACT?i.default:a.default;return(0,o.createScopedElement)(n,(0,r.default)({vkuiClass:(0,c.getClassName)("DropdownIcon",t)},e))}},332179:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(119360),l=n(672705),u=n(793987),d=n(504153),_=n(644029),p=["activeStory","tabbar","children","viewWidth"],h=(0,_.warnOnce)("Epic");const f=(0,l.withAdaptivity)((function(e){var t=(0,c.usePlatform)(),n=a.useRef({}).current,l=e.activeStory,_=e.tabbar,f=e.children,m=(e.viewWidth,(0,o.default)(e,p));var v=a.Children.toArray(f).find((function(e){return(0,d.getNavId)(e.props,h)===l}))||null;return(0,i.createScopedElement)("div",(0,r.default)({},m,{vkuiClass:(0,s.getClassName)("Epic",t)}),(0,i.createScopedElement)(u.ScrollSaver,{key:l,initialScroll:n[l]||0,saveScroll:function(e){return n[l]=e}},v),_)}),{viewWidth:!0})},793987:(e,t,n)=>{"use strict";n.d(t,{ScrollSaver:()=>a});var r=n(667294),o=n(909795),i=n(214542),a=function(e){var t=e.children,n=e.initialScroll,a=e.saveScroll,s=r.useContext(o.ScrollContext),c=s.getScroll,l=s.scrollTo;return(0,i.useIsomorphicLayoutEffect)((function(){return"number"==typeof n&&l(0,n),function(){return a(c().y)}}),[]),t}},617224:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(658113),c=n(119360),l=n(428253),u=["children","align","controlSize","mode","stretched","before","className","style","getRef","getRootRef","onClick"],d=function(e){var t=e.children,n=e.align,d=e.controlSize,_=e.mode,p=e.stretched,h=e.before,f=e.className,m=e.style,v=e.getRef,g=e.getRootRef,y=e.onClick,E=(0,o.default)(e,u),w=(0,c.usePlatform)(),b=(0,l.useExternRef)(v);return(0,i.createScopedElement)(s.default,{align:n,vkuiClass:(0,a.getClassName)("File",w),className:f,stretched:p,mode:_,size:d,before:h,style:m,getRootRef:g,disabled:E.disabled,type:"button",onClick:function(e){b.current.click(),y&&y(e)}},(0,i.createScopedElement)("input",(0,r.default)({},E,{vkuiClass:"File__input",type:"file",ref:b})),t)};d.defaultProps={children:"Выберите файл",align:"left"};const _=d},781959:(e,t,n)=>{"use strict";n.d(t,{default:()=>v});var r=n(300975),o=n(309919),i=n(46008),a=n(243835),s=n(735567),c=n(667294),l=n(780778),u=n(93781),d=n(946674),_=n(566506),p=n(181498),h=n(283821),f=n(119360),m=["children","style","vertical","getRootRef","getRef","filled"];const v=function(e){var t=e.children,n=e.style,v=e.vertical,g=e.getRootRef,y=e.getRef,E=e.filled,w=(0,a.default)(e,m),b=(0,f.usePlatform)(),C=c.useState(null),S=(0,i.default)(C,2),T=S[0],A=S[1],D=(0,p.useDOM)().window,P=c.useContext(d.SplitColContext).colRef,O=function(){return A(null!=P&&P.current?"".concat(P.current.offsetWidth,"px"):null)};return c.useEffect(O,[]),(0,h.useGlobalEventListener)(D,"resize",O),(0,s.createScopedElement)(_.TooltipContainer,(0,r.default)({},w,{fixed:!0,ref:g,vkuiClass:(0,u.classNames)((0,l.getClassName)("FixedLayout",b),{"FixedLayout--filled":E},"FixedLayout--".concat(v)),style:(0,o.default)((0,o.default)({},n),{},{width:T})}),(0,s.createScopedElement)("div",{vkuiClass:"FixedLayout__in",ref:y},t))}},843718:(e,t,n)=>{"use strict";n.d(t,{FocusTrap:()=>g});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(428253),l=n(283821),u=n(855356),d=n(304830),_=n(181498),p=n(214542),h=n(256631),f=n(338784),m=["Component","onClose","restoreFocus","timeout","getRootRef","children"],v=d.FOCUSABLE_ELEMENTS_LIST.join(),g=function(e){var t=e.Component,n=void 0===t?"div":t,g=e.onClose,y=void 0===g?h.noop:g,E=e.restoreFocus,w=void 0===E||E,b=e.timeout,C=void 0===b?0:b,S=e.getRootRef,T=e.children,A=(0,i.default)(e,m),D=(0,c.useExternRef)(S),P=(0,_.useDOM)(),O=P.document,I=P.window,k=O.activeElement,R=s.useState(null),M=(0,o.default)(R,2),L=M[0],x=M[1],N=s.useState(null),B=(0,o.default)(N,2),U=B[0],F=B[1],W=s.useContext(f.AppRootContext).keyboardInput,V=(0,u.useTimeout)((function(){var e;!W||null!==(e=D.current)&&void 0!==e&&e.contains(k)||null==L||!L.length||L[0].focus()}),C);(0,p.useIsomorphicLayoutEffect)((function(){V.set()}),[]),(0,p.useIsomorphicLayoutEffect)((function(){if(!D.current)return(0,h.noop)();var e=[];return Array.prototype.forEach.call(D.current.querySelectorAll(v),(function(t){var n=I.getComputedStyle(t),r=n.display,o=n.visibility;"none"!==r&&"hidden"!==o&&e.push(t)})),null!=e&&e.length&&x(e),(0,h.noop)()}),[T]);var H=(0,u.useTimeout)((function(){U&&U.focus()}),C);(0,p.useIsomorphicLayoutEffect)((function(){return w?(F(k),function(){H.set()}):(0,h.noop)()}),[w]);return(0,l.useGlobalEventListener)(O,"keydown",(function(e){if((0,d.pressedKey)(e)===d.Keys.TAB&&null!=L&&L.length){var t=L.length-1,n=L.findIndex((function(t){return t===e.target})),r=-1===n||n===t&&!e.shiftKey;if(r||0===n&&e.shiftKey){e.preventDefault();var o=L[r?0:t];return o!==k&&o.focus(),!1}}return(0,d.pressedKey)(e)===d.Keys.ESCAPE&&y(),!0}),{capture:!0}),(0,a.createScopedElement)(n,(0,r.default)({ref:D},A),T)}},266917:(e,t,n)=>{"use strict";n.d(t,{FocusVisible:()=>i});var r=n(735567),o=n(93781),i=function(e){var t=e.mode;return(0,r.createScopedElement)("span",{"aria-hidden":"true",vkuiClass:(0,o.classNames)("FocusVisible","FocusVisible--".concat(t))})}},462926:(e,t,n)=>{"use strict";n.d(t,{Footer:()=>c});var r=n(300975),o=n(243835),i=n(735567),a=n(443910),s=["children"],c=function(e){var t=e.children,n=(0,o.default)(e,s);return(0,i.createScopedElement)(a.default,(0,r.default)({Component:"footer"},n,{level:"1",weight:"regular",vkuiClass:"Footer"}),t)}},937188:(e,t,n)=>{"use strict";n.d(t,{FormField:()=>h});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(780778),l=n(93781),u=n(119360),d=n(256631),_=n(324285),p=["Component","children","getRootRef","after","disabled"],h=function(e){var t=e.Component,n=void 0===t?"div":t,h=e.children,f=e.getRootRef,m=e.after,v=e.disabled,g=(0,i.default)(e,p),y=(0,u.usePlatform)(),E=(0,_.useAdaptivity)().sizeY,w=s.useState(!1),b=(0,o.default)(w,2),C=b[0],S=b[1];return(0,a.createScopedElement)(n,(0,r.default)({role:"presentation"},g,{ref:f,onMouseEnter:function(e){e.stopPropagation(),S(!0)},onMouseLeave:function(e){e.stopPropagation(),S(!1)},vkuiClass:(0,l.classNames)((0,c.getClassName)("FormField",y),"FormField--sizeY-".concat(E),{"FormField--disabled":v})}),h,(0,d.hasReactNode)(m)&&(0,a.createScopedElement)("div",{role:"presentation",vkuiClass:"FormField__after"},m),(0,a.createScopedElement)("div",{role:"presentation",vkuiClass:(0,l.classNames)("FormField__border",{"FormField__border--hover":!v&&C})}))}},18245:(e,t,n)=>{"use strict";n.d(t,{FormItem:()=>v});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(93781),c=n(428253),l=n(119360),u=n(780778),d=n(256631),_=n(243912),p=n(443910),h=n(324285),f=n(594735),m=["children","top","bottom","status","Component","removable","onRemove","removePlaceholder","getRootRef"],v=function(e){var t=e.children,n=e.top,v=e.bottom,g=e.status,y=void 0===g?"default":g,E=e.Component,w=void 0===E?"div":E,b=e.removable,C=e.onRemove,S=e.removePlaceholder,T=void 0===S?"Удалить":S,A=e.getRootRef,D=(0,o.default)(e,m),P=(0,l.usePlatform)(),O=(0,c.useExternRef)(A),I=(0,h.useAdaptivity)().sizeY,k=(0,i.createScopedElement)(a.Fragment,null,(0,d.hasReactNode)(n)&&(0,i.createScopedElement)(_.default,{weight:"regular",vkuiClass:"FormItem__top"},n),t,(0,d.hasReactNode)(v)&&(0,i.createScopedElement)(p.default,{level:"1",weight:"regular",vkuiClass:"FormItem__bottom"},v));return(0,i.createScopedElement)(w,(0,r.default)({},D,{ref:O,vkuiClass:(0,s.classNames)((0,u.getClassName)("FormItem",P),"FormItem--".concat(y),"FormItem--sizeY-".concat(I),{"FormItem--withTop":(0,d.hasReactNode)(n),"FormItem--removable":b})}),b?(0,i.createScopedElement)(f.Removable,{align:"start",onRemove:function(e){return C(e,null==O?void 0:O.current)},removePlaceholder:T},(0,i.createScopedElement)("div",{vkuiClass:"FormItem__removable"},k)):k)}},590106:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(119360),c=["children","Component","getRef","onSubmit"],l=function(e){var t=e.children,n=e.Component,l=e.getRef,u=e.onSubmit,d=(0,o.default)(e,c),_=(0,s.usePlatform)();return(0,i.createScopedElement)(n,(0,r.default)({},d,{vkuiClass:(0,a.getClassName)("FormLayout",_),onSubmit:u,ref:l}),(0,i.createScopedElement)("div",{vkuiClass:"FormLayout__container"},t),"form"===n&&(0,i.createScopedElement)("input",{type:"submit",vkuiClass:"FormLayout__submit",value:""}))};l.defaultProps={Component:"form",onSubmit:function(e){return e.preventDefault()}};const u=l},380762:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(93781),c=n(428253),l=n(119360),u=n(594735),d=n(324285),_=["children","mode","removable","removePlaceholder","onRemove","getRootRef"];const p=function(e){var t=e.children,n=e.mode,p=void 0===n?"vertical":n,h=e.removable,f=e.removePlaceholder,m=void 0===f?"Удалить":f,v=e.onRemove,g=e.getRootRef,y=(0,o.default)(e,_),E=(0,l.usePlatform)(),w=(0,d.useAdaptivity)().sizeY,b=h&&"horizontal"===p,C=(0,c.useExternRef)(g);return(0,i.createScopedElement)("div",(0,r.default)({ref:C,vkuiClass:(0,s.classNames)((0,a.getClassName)("FormLayoutGroup",E),"FormLayoutGroup--sizeY-".concat(w),"FormLayoutGroup--".concat(p),{"FormLayoutGroup--removable":b})},y),b?(0,i.createScopedElement)(u.Removable,{vkuiClass:"FormLayoutGroup__removable",align:"start",removePlaceholder:m,onRemove:function(e){return v(e,null==C?void 0:C.current)}},t):t)}},53961:(e,t,n)=>{"use strict";n.d(t,{FormStatus:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(93781),s=n(780778),c=n(119360),l=n(115446),u=n(443910),d=n(256631),_=["mode","header","children","dangerouslySetInnerHTML"],p=function(e){var t=e.mode,n=e.header,p=e.children,h=e.dangerouslySetInnerHTML,f=(0,o.default)(e,_),m=(0,c.usePlatform)();return(0,i.createScopedElement)("div",(0,r.default)({},f,{vkuiClass:(0,a.classNames)((0,s.getClassName)("FormStatus",m),"FormStatus--".concat(t))}),(0,d.hasReactNode)(n)&&(0,i.createScopedElement)(l.default,{weight:"medium",vkuiClass:"FormStatus__header"},n),h&&(0,i.createScopedElement)(u.default,{level:"1",weight:"regular",dangerouslySetInnerHTML:h}),(0,d.hasReactNode)(p)&&!h&&(0,i.createScopedElement)(u.default,{level:"1",weight:"regular"},p))}},87223:(e,t,n)=>{"use strict";n.d(t,{default:()=>P});var r=n(46008),o=n(300975),i=n(243835),a=n(640137),s=n(101226),c=n(171178),l=n(351475),u=n(682754),d=n(939844),_=n(735567),p=n(667294),h=n(780778),f=n(763029),m=n(93781),v=n(212602),g=n(181498),y=n(256631),E=n(672705),w=n(493788),b=n(633656),C=n(855356),S=["children","slideWidth","slideIndex","isDraggable","onDragStart","onDragEnd","onChange","onEnd","align","bullets","platform","hasMouse","showArrows","window","document","getRef","getRootRef"],T=["initialSlideIndex","children","timeout","onChange"],A=function(e){(0,l.default)(n,e);var t=(0,u.default)(n);function n(e){var r;return(0,a.default)(this,n),r=t.call(this,e),(0,d.default)((0,c.default)(r),"container",void 0),(0,d.default)((0,c.default)(r),"slidesStore",void 0),(0,d.default)((0,c.default)(r),"viewport",void 0),(0,d.default)((0,c.default)(r),"onStart",(function(){r.setState({animation:!1})})),(0,d.default)((0,c.default)(r),"onMoveX",(function(e){r.props.isDraggable&&!r.isFullyVisible&&(e.originalEvent.preventDefault(),e.isSlideX&&(r.props.onDragStart&&r.props.onDragStart(e),r.state.deltaX===e.shiftX&&r.state.dragging===e.isSlideX||r.setState({deltaX:e.shiftX,dragging:e.isSlideX})))})),(0,d.default)((0,c.default)(r),"onEnd",(function(e){var t=e.isSlide?r.getTarget(e):r.props.slideIndex;r.props.onDragEnd&&r.props.onDragEnd(e),r.setState({deltaX:0,animation:!0},(function(){return r.props.onChange(t)})),r.props.onEnd&&r.props.onEnd({targetIndex:t})})),(0,d.default)((0,c.default)(r),"onResize",(function(){return r.initializeSlides({animation:!1})})),(0,d.default)((0,c.default)(r),"slideLeft",(function(){var e=r.props,t=e.slideIndex,n=e.onChange;r.canSlideLeft&&r.setState({deltaX:0,animation:!0},(function(){return n(t-1)}))})),(0,d.default)((0,c.default)(r),"slideRight",(function(){var e=r.props,t=e.slideIndex,n=e.onChange;r.canSlideRight&&r.setState({deltaX:0,animation:!0},(function(){return n(t+1)}))})),(0,d.default)((0,c.default)(r),"getSlideRef",(function(e){return function(t){r.slidesStore["slide-".concat(e)]=t}})),(0,d.default)((0,c.default)(r),"getViewportRef",(function(e){r.viewport=e,(0,y.setRef)(e,r.props.getRef)})),(0,d.default)((0,c.default)(r),"getRootRef",(function(e){r.container=e,(0,y.setRef)(e,r.props.getRootRef)})),r.state={containerWidth:0,deltaX:0,shiftX:0,slides:[],animation:!0,duration:.24},r.slidesStore={},r}return(0,s.default)(n,[{key:"isCenterWithCustomWidth",get:function(){return"custom"===this.props.slideWidth&&"center"===this.props.align}},{key:"initializeSlides",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=p.Children.map(this.props.children,(function(t,n){var r=e.slidesStore["slide-".concat(n)];return{coordX:r.offsetLeft,width:r.offsetWidth}})),r=this.container.offsetWidth,o=n.reduce((function(e,t){return t.width+e}),0),i=this.calcMin({containerWidth:r,layerWidth:o,slides:n}),a=this.calcMax({slides:n});this.setState({min:i,max:a,layerWidth:o,containerWidth:r,slides:n},(function(){var n=e.calculateIndent(e.props.slideIndex);if(e.state.shiftX!==n){var r=e.state.shiftX===e.validateIndent(e.state.shiftX),o=t.animation,i=void 0===o?r:o;e.setState({shiftX:n,animation:i},(function(){e.state.animation||e.props.window.requestAnimationFrame((function(){return e.setState({animation:!0})}))}))}}))}},{key:"calcMin",value:function(e){var t=e.containerWidth,n=e.layerWidth,r=e.slides,o=this.viewport.offsetWidth;switch(this.props.align){case"left":return t-n;case"right":return o-n;case"center":if(this.isCenterWithCustomWidth&&r.length){var i=r[r.length-1];return o/2-i.coordX-i.width/2}return o-(t-o)/2-n}}},{key:"calcMax",value:function(e){var t=e.slides,n=this.viewport.offsetWidth;if(this.isCenterWithCustomWidth&&t.length){var r=t[0],o=r.width;return n/2-r.coordX-o/2}return 0}},{key:"calculateIndent",value:function(e){var t=this.state.slides;if(this.isFullyVisible)return 0;var n=t.length?t[e]:null;if(n){var r=n.coordX,o=n.width;return this.isCenterWithCustomWidth?this.viewport.offsetWidth/2-r-o/2:this.validateIndent(-1*r)}return 0}},{key:"calculateDragIndent",value:function(){var e=this.state,t=e.shiftX,n=e.deltaX,r=e.min,o=e.max,i=t+n;return i>o?o+Number((i-o)/3):i<r?r+Number((i-r)/3):i}},{key:"validateIndent",value:function(e){var t=this.state,n=t.min,r=t.max;return e<n?n:e>r?r:e}},{key:"isFullyVisible",get:function(){return this.state.layerWidth<=this.state.containerWidth}},{key:"getTarget",value:function(e){var t=this.state,n=t.slides,r=t.deltaX,o=t.shiftX,i=t.max,a=this.props.slideIndex,s=o+r+r/e.duration*240*.6-i,c=r<0?1:-1,l=n.reduce((function(e,t,r){return Math.abs(n[e].coordX+s)<Math.abs(t.coordX+s)?e:r}),a);if(l===a){var u=a+c;u>=0&&u<n.length&&Math.abs(r)>.05*n[u].width&&(l=u)}return l}},{key:"canSlideLeft",get:function(){return!this.isFullyVisible&&this.state.shiftX<0}},{key:"canSlideRight",get:function(){var e=this.state,t=e.containerWidth,n=e.layerWidth,r=e.shiftX,o=e.slides,i=this.props,a=i.align,s=i.slideIndex;return!this.isFullyVisible&&("left"===a&&t-r<n||"left"!==a&&s<o.length-1)}},{key:"componentDidMount",value:function(){this.initializeSlides({animation:!1}),this.props.window.addEventListener("resize",this.onResize)}},{key:"componentDidUpdate",value:function(e){var t=this.props.slideWidth!==e.slideWidth,n=this.props!==e,r=p.Children.count(this.props.children)!==p.Children.count(e.children),o="custom"===this.props.slideWidth;t||r||o&&n?this.initializeSlides():this.props.slideIndex!==e.slideIndex&&this.setState({animation:!0,deltaX:0,shiftX:this.calculateIndent(this.props.slideIndex)})}},{key:"componentWillUnmount",value:function(){this.props.window.removeEventListener("resize",this.onResize)}},{key:"render",value:function(){var e=this,t=this.state,n=t.animation,r=t.duration,a=t.dragging,s=this.props,c=s.children,l=s.slideWidth,u=s.slideIndex,d=(s.isDraggable,s.onDragStart,s.onDragEnd,s.onChange,s.onEnd,s.align),v=s.bullets,g=s.platform,y=s.hasMouse,E=s.showArrows,b=(s.window,s.document,s.getRef,s.getRootRef,(0,i.default)(s,S)),C=a?this.calculateDragIndent():this.calculateIndent(u),T={WebkitTransform:"translateX(".concat(C,"px)"),transform:"translateX(".concat(C,"px)"),WebkitTransition:n?"-webkit-transform ".concat(r,"s cubic-bezier(.1, 0, .25, 1)"):"none",transition:n?"transform ".concat(r,"s cubic-bezier(.1, 0, .25, 1)"):"none"};return(0,_.createScopedElement)("div",(0,o.default)({},b,{vkuiClass:(0,m.classNames)((0,h.getClassName)("Gallery",g),"Gallery--".concat(d),{"Gallery--dragging":a,"Gallery--custom-width":"custom"===l}),ref:this.getRootRef}),(0,_.createScopedElement)(f.Touch,{vkuiClass:"Gallery__viewport",onStartX:this.onStart,onMoveX:this.onMoveX,onEnd:this.onEnd,noSlideClick:!0,style:{width:"custom"===l?"100%":l},getRootRef:this.getViewportRef},(0,_.createScopedElement)("div",{vkuiClass:"Gallery__layer",style:T},p.Children.map(c,(function(t,n){return(0,_.createScopedElement)("div",{vkuiClass:"Gallery__slide",key:"slide-".concat(n),ref:e.getSlideRef(n)},t)})))),v&&(0,_.createScopedElement)("div",{"aria-hidden":"true",vkuiClass:(0,m.classNames)("Gallery__bullets","Gallery__bullets--".concat(v))},p.Children.map(c,(function(e,t){return(0,_.createScopedElement)("div",{vkuiClass:(0,m.classNames)("Gallery__bullet",{"Gallery__bullet--active":t===u}),key:t})}))),E&&y&&this.canSlideLeft&&(0,_.createScopedElement)(w.default,{direction:"left",onClick:this.slideLeft}),E&&y&&this.canSlideRight&&(0,_.createScopedElement)(w.default,{direction:"right",onClick:this.slideRight}))}}]),n}(p.Component);(0,d.default)(A,"defaultProps",{slideWidth:"100%",children:"",align:"left",bullets:!1,isDraggable:!0});var D=(0,E.withAdaptivity)((0,g.withDOM)(A),{hasMouse:!0});const P=(0,v.withPlatform)((function(e){var t=e.initialSlideIndex,n=void 0===t?0:t,a=e.children,s=e.timeout,c=e.onChange,l=(0,i.default)(e,T),u=p.useState(n),d=(0,r.default)(u,2),h=d[0],f=d[1],m="number"==typeof l.slideIndex,v=m?l.slideIndex:h,g=!m||Boolean(c),y=p.Children.toArray(a).filter((function(e){return Boolean(e)})),E=y.length,w=p.useCallback((function(e){e!==v&&(!m&&f(e),c&&c(e))}),[c,v]),S=(0,C.useTimeout)((function(){return w((v+1)%E)}),s);p.useEffect((function(){return s?S.set():S.clear()}),[s,v]);var A=E>0?(0,b.clamp)(v,0,E-1):v;return p.useEffect((function(){c&&A!==v&&c(A)}),[A]),(0,_.createScopedElement)(D,(0,o.default)({isDraggable:g},l,{slideIndex:A,onChange:w}),y)}))},654202:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var r=n(300975),o=n(243835),i=n(735567),a=n(93781),s=["mode","children","to"],c=function(e){var t=e.mode,n=e.children,c=e.to,l=(0,o.default)(e,s);return(0,i.createScopedElement)("div",(0,r.default)({role:"presentation"},l,{vkuiClass:(0,a.classNames)("Gradient","Gradient--md-".concat(t),"Gradient--to-".concat(c))}),n)};c.defaultProps={mode:"tint",to:"top"};const l=c},456902:(e,t,n)=>{"use strict";n.d(t,{GridAvatar:()=>u});var r=n(300975),o=n(243835),i=n(735567),a=n(900863),s=n(93781),c=n(644029),l=["src","size","shadow"],u=((0,c.warnOnce)("GridAvatar"),function(e){var t=e.src,n=void 0===t?[]:t,c=e.size,u=void 0===c?a.AVATAR_DEFAULT_SIZE:c,d=e.shadow,_=void 0===d?a.AVATAR_DEFAULT_SHADOW:d,p=(0,o.default)(e,l);var h=Math.max(1,Math.min(4,n.length));return(0,i.createScopedElement)(a.default,(0,r.default)({},p,{vkuiClass:(0,s.classNames)("GridAvatar","GridAvatar--images-".concat(h)),shadow:_,size:u}),(0,i.createScopedElement)("div",{vkuiClass:"GridAvatar__in"},n.slice(0,4).map((function(e,t){return(0,i.createScopedElement)("div",{key:t,vkuiClass:"GridAvatar__item",style:{backgroundImage:"url(".concat(e,")")}})}))))})},11610:(e,t,n)=>{"use strict";n.d(t,{default:()=>g});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(93781),l=n(119360),u=n(346921),d=n(256631),_=n(443910),p=n(362276),h=n(672705),f=n(811113),m=["header","description","children","separator","getRootRef","mode","sizeX"],v=function(e){var t=e.header,n=e.description,h=e.children,v=e.separator,g=e.getRootRef,y=e.mode,E=e.sizeX,w=(0,o.default)(e,m),b=a.useContext(f.default).isInsideModal,C=(0,l.usePlatform)(),S=y;return y||(S=E===p.SizeType.COMPACT||b?"plain":"card"),(0,i.createScopedElement)("section",(0,r.default)({},w,{ref:g,vkuiClass:(0,c.classNames)((0,s.getClassName)("Group",C),"Group--sizeX-".concat(E),"Group--".concat(S))}),(0,i.createScopedElement)("div",{vkuiClass:"Group__inner"},t,h,(0,d.hasReactNode)(n)&&(0,i.createScopedElement)(_.default,{vkuiClass:"Group__description",weight:"regular",level:"1"},n)),"hide"!==v&&(0,i.createScopedElement)(u.default,{vkuiClass:(0,c.classNames)("Group__separator",{"Group__separator--force":"show"===v}),expanded:"card"===S}))};v.defaultProps={separator:"auto"};const g=(0,h.withAdaptivity)(v,{sizeX:!0})},341238:(e,t,n)=>{"use strict";n.d(t,{default:()=>S});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(93781),c=n(119360),l=n(256631),u=n(108681),d=n(115446),_=n(443910),p=n(931252),h=n(455833),f=n(243912),m=["platform","mode"],v=["platform"],g=["mode"],y=["mode","children","subtitle","indicator","aside","getRootRef","multiline"],E=function(e){var t=e.platform,n=e.mode,a=(0,o.default)(e,m);if(t===u.Platform.IOS)switch(n){case"primary":case"tertiary":return(0,i.createScopedElement)(p.default,(0,r.default)({weight:"semibold",level:"3"},a));case"secondary":return(0,i.createScopedElement)(_.default,(0,r.default)({level:"1",weight:"semibold",caps:!0},a))}if(t===u.Platform.VKCOM)switch(n){case"primary":return(0,i.createScopedElement)(d.default,(0,r.default)({weight:"regular"},a));case"secondary":case"tertiary":return(0,i.createScopedElement)(_.default,(0,r.default)({level:"1",weight:"regular"},a))}switch(n){case"primary":case"tertiary":return(0,i.createScopedElement)(d.default,(0,r.default)({weight:"medium"},a));case"secondary":return(0,i.createScopedElement)(_.default,(0,r.default)({level:"1",weight:"medium",caps:!0},a))}},w=function(e){var t=e.platform,n=(0,o.default)(e,v);return t===u.Platform.VKCOM?(0,i.createScopedElement)(f.default,(0,r.default)({weight:"regular"},n)):(0,i.createScopedElement)(h.default,(0,r.default)({weight:"regular"},n))},b=function(e){var t=e.mode,n=(0,o.default)(e,g);return"secondary"===t?(0,i.createScopedElement)(f.default,(0,r.default)({weight:"regular"},n)):(0,i.createScopedElement)(_.default,(0,r.default)({weight:"regular",level:"1"},n))},C=function(e){var t=e.mode,n=e.children,u=e.subtitle,d=e.indicator,p=e.aside,h=e.getRootRef,f=e.multiline,m=(0,o.default)(e,y),v=(0,c.usePlatform)();return(0,i.createScopedElement)("header",(0,r.default)({},m,{ref:h,vkuiClass:(0,s.classNames)((0,a.getClassName)("Header",v),"Header--mode-".concat(t),{"Header--pi":(0,l.isPrimitiveReactNode)(d)})}),(0,i.createScopedElement)("div",{vkuiClass:"Header__main"},(0,i.createScopedElement)(E,{vkuiClass:"Header__content",Component:"span",mode:t,platform:v},(0,i.createScopedElement)("span",{vkuiClass:(0,s.classNames)("Header__content-in",{"Header__content-in--multiline":f})},n),(0,l.hasReactNode)(d)&&(0,i.createScopedElement)(_.default,{vkuiClass:"Header__indicator",weight:"primary"===t||"secondary"===t?"medium":"regular",level:"1"},d)),(0,l.hasReactNode)(u)&&(0,i.createScopedElement)(b,{vkuiClass:"Header__subtitle",Component:"span"},u)),(0,l.hasReactNode)(p)&&(0,i.createScopedElement)(w,{vkuiClass:"Header__aside",Component:"span",platform:v},p))};C.defaultProps={mode:"primary"};const S=C},698091:(e,t,n)=>{"use strict";n.d(t,{HorizontalCell:()=>v});var r=n(300975),o=n(243835),i=n(735567),a=n(93781),s=n(780778),c=n(119360),l=n(256631),u=n(443910),d=n(795281),_=n(243912),p=n(900863),h=["size","children"],f=["className","header","style","subtitle","size","children","getRootRef","getRef"],m=function(e){var t=e.size,n=e.children,a=(0,o.default)(e,h);return"s"===t?(0,i.createScopedElement)(u.default,(0,r.default)({level:"2",weight:"regular"},a),n):(0,i.createScopedElement)(_.default,(0,r.default)({weight:"regular"},a),n)},v=function(e){var t=e.className,n=e.header,_=e.style,h=e.subtitle,v=e.size,g=void 0===v?"s":v,y=e.children,E=void 0===y?(0,i.createScopedElement)(p.default,{size:56}):y,w=e.getRootRef,b=e.getRef,C=(0,o.default)(e,f),S=(0,c.usePlatform)();return(0,i.createScopedElement)("div",{vkuiClass:(0,a.classNames)((0,s.getClassName)("HorizontalCell",S),"HorizontalCell--".concat(g)),ref:w,style:_,className:t},(0,i.createScopedElement)(d.default,(0,r.default)({vkuiClass:"HorizontalCell__body",getRootRef:b},C),(0,l.hasReactNode)(E)&&(0,i.createScopedElement)("div",{vkuiClass:"HorizontalCell__image"},E),(0,i.createScopedElement)("div",{vkuiClass:"HorizontalCell__content"},(0,l.hasReactNode)(n)&&(0,i.createScopedElement)(m,{size:g,vkuiClass:"HorizontalCell__title"},n),(0,l.hasReactNode)(h)&&(0,i.createScopedElement)(u.default,{weight:"regular",level:"1",vkuiClass:"HorizontalCell__subtitle"},h))))}},635717:(e,t,n)=>{"use strict";n.d(t,{default:()=>v});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(119360),l=n(780778),u=n(672705),d=n(493788),_=n(888420),p=n(151571),h=n(428253),f=["children","getScrollToLeft","getScrollToRight","showArrows","scrollAnimationDuration","hasMouse","getRef"];function m(){return performance&&performance.now?performance.now():Date.now()}const v=(0,u.withAdaptivity)((function(e){var t=e.children,n=e.getScrollToLeft,u=e.getScrollToRight,v=e.showArrows,g=void 0===v||v,y=e.scrollAnimationDuration,E=e.hasMouse,w=e.getRef,b=(0,i.default)(e,f),C=s.useState(!1),S=(0,o.default)(C,2),T=S[0],A=S[1],D=s.useState(!1),P=(0,o.default)(D,2),O=P[0],I=P[1],k=s.useRef(!1),R=(0,h.useExternRef)(w),M=s.useRef([]),L=(0,c.usePlatform)();function x(e){var t=R.current;M.current.push((function(){var n;return function(e){var t=e.scrollElement,n=e.getScrollPosition,r=e.animationQueue,o=e.onScrollToRightBorder,i=e.onScrollEnd,a=e.onScrollStart,s=e.initialScrollWidth,c=e.scrollAnimationDuration,l=void 0===c?250:c;if(t&&n){var u=s-t.offsetWidth,d=t.scrollLeft,p=n(d);a(),p>=u&&(o(),p=u);var h=m();!function e(){if(t){var n=m(),o=Math.min((n-h)/l,1),a=(0,_.easeInOutSine)(o),s=d+(p-d)*a;t.scrollLeft=Math.ceil(s),t.scrollLeft===Math.max(0,p)?(i(),r.shift(),r.length>0&&r[0]()):requestAnimationFrame(e)}else i()}()}}({scrollElement:t,getScrollPosition:e,animationQueue:M.current,onScrollToRightBorder:function(){return I(!1)},onScrollEnd:function(){return k.current=!1},onScrollStart:function(){return k.current=!0},initialScrollWidth:(null==t||null===(n=t.firstElementChild)||void 0===n?void 0:n.scrollWidth)||0,scrollAnimationDuration:y})})),1===M.current.length&&M.current[0]()}var N=s.useCallback((function(){if(g&&E&&R.current&&!k.current){var e=R.current;A(e.scrollLeft>0),I(e.scrollLeft+e.offsetWidth<e.scrollWidth)}}),[E]),B=(0,p.useEventListener)("scroll",N);return s.useEffect((function(){return B.add(R.current)}),[]),s.useEffect(N,[R,t]),(0,a.createScopedElement)("div",(0,r.default)({},b,{vkuiClass:(0,l.getClassName)("HorizontalScroll",L)}),g&&E&&T&&(0,a.createScopedElement)(d.default,{direction:"left",onClick:function(){return x(n)}}),g&&E&&O&&(0,a.createScopedElement)(d.default,{direction:"right",onClick:function(){return x(u)}}),(0,a.createScopedElement)("div",{vkuiClass:"HorizontalScroll__in",ref:R},(0,a.createScopedElement)("div",{vkuiClass:"HorizontalScroll__in-wrapper"},t)))}),{hasMouse:!0})},493788:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var r=n(735567),o=n(783199),i=n(119360),a=n(780778),s=n(93781),c=n(795281);const l=function(e){var t=e.onClick,n=e.direction,l=(0,i.usePlatform)();return(0,r.createScopedElement)(c.default,{Component:"button",hasHover:!1,hasActive:!1,vkuiClass:(0,s.classNames)((0,a.getClassName)("HorizontalScrollArrow",l),"HorizontalScrollArrow--".concat(n)),onClick:t},(0,r.createScopedElement)("span",{vkuiClass:"HorizontalScrollArrow__icon"},(0,r.createScopedElement)(o.default,null)))}},600245:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(300975),o=n(243835),i=n(735567),a=n(795281),s=n(780778),c=n(93781),l=n(119360),u=n(672705),d=n(108681),_=["icon","sizeY","children","Component"],p=function(e){var t=e.icon,n=e.sizeY,u=e.children,p=e.Component,h=(0,o.default)(e,_),f=(0,l.usePlatform)();return(0,i.createScopedElement)(a.default,(0,r.default)({},h,{Component:h.href?"a":p,activeEffectDelay:200,activeMode:f===d.IOS?"opacity":"IconButton--active",vkuiClass:(0,c.classNames)((0,s.getClassName)("IconButton",f),"IconButton--sizeY-".concat(n))}),t||u)};p.defaultProps={Component:"button"};const h=(0,u.withAdaptivity)(p,{sizeY:!0})},392903:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(243835),i=n(735567),a=n(243912),s=n(780778),c=n(119360),l=n(115446),u=n(256631),d=["header","children"];const _=function(e){var t=e.header,n=e.children,_=(0,o.default)(e,d),p=(0,c.usePlatform)();return(0,i.createScopedElement)(l.default,(0,r.default)({},_,{vkuiClass:(0,s.getClassName)("InfoRow",p),weight:"regular"}),(0,u.hasReactNode)(t)&&(0,i.createScopedElement)(a.default,{Component:"span",vkuiClass:"InfoRow__header",weight:"regular"},t),n)}},575684:(e,t,n)=>{"use strict";n.d(t,{InitialsAvatar:()=>d});var r=n(300975),o=n(309919),i=n(243835),a=n(735567),s=n(93781),c=n(900863),l=["size","shadow","children","gradientColor","style"],u={1:"red",2:"orange",3:"yellow",4:"green",5:"l-blue",6:"violet"};var d=function(e){var t,n,d=e.size,_=void 0===d?c.AVATAR_DEFAULT_SIZE:d,p=e.shadow,h=void 0===p?c.AVATAR_DEFAULT_SHADOW:p,f=e.children,m=e.gradientColor,v=e.style,g=(0,i.default)(e,l),y="string"==typeof m?m:u[m];return(0,a.createScopedElement)(c.default,(0,r.default)({},g,{style:(0,o.default)((0,o.default)({},v),{},{fontSize:(t=_,n=Math.ceil(.36*t),n+n%2)}),shadow:h,size:_,vkuiClass:(0,s.classNames)("InitialsAvatar","InitialsAvatar--color-".concat(y))}),(0,a.createScopedElement)("span",{"aria-hidden":"true",vkuiClass:"InitialsAvatar__text"},f))}},383567:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(300975),o=n(939844),i=n(243835),a=n(735567),s=n(780778),c=n(93781),l=n(937188),u=n(672705),d=n(119360),_=["align","getRef","className","getRootRef","sizeY","style","after"],p=function(e){var t=e.align,n=e.getRef,u=e.className,p=e.getRootRef,h=e.sizeY,f=e.style,m=e.after,v=(0,i.default)(e,_),g=(0,d.usePlatform)();return(0,a.createScopedElement)(l.FormField,{vkuiClass:(0,c.classNames)((0,s.getClassName)("Input",g),(0,o.default)({},"Input--".concat(t),!!t),"Input--sizeY-".concat(h)),style:f,className:u,getRootRef:p,after:m,disabled:v.disabled},(0,a.createScopedElement)("input",(0,r.default)({},v,{vkuiClass:"Input__el",ref:n})))};p.defaultProps={type:"text"};const h=(0,u.withAdaptivity)(p,{sizeY:!0})},630093:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(119360),c=n(795281),l=["children"];const u=function(e){var t=e.children,n=(0,o.default)(e,l),u=(0,s.usePlatform)();return(0,i.createScopedElement)(c.default,(0,r.default)({Component:n.href?"a":"button"},n,{vkuiClass:(0,a.getClassName)("Link",u),hasActive:!1,hoverMode:"opacity",focusVisibleMode:"outside"}),t)}},639731:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(93781),l=n(780778),u=n(119360),d=n(554035),_=["children"];const p=function(e){var t=e.children,n=(0,i.default)(e,_),p=(0,u.usePlatform)(),h=s.useState(!1),f=(0,o.default)(h,2),m=f[0],v=f[1];return(0,a.createScopedElement)("div",(0,r.default)({role:"list"},n,{vkuiClass:(0,c.classNames)((0,l.getClassName)("List",p),{"List--dragging":m})}),(0,a.createScopedElement)(d.ListContext.Provider,{value:s.useMemo((function(){return{toggleDrag:v}}),[])},t))}},554035:(e,t,n)=>{"use strict";n.d(t,{ListContext:()=>i});var r=n(667294),o=n(256631),i=r.createContext({toggleDrag:o.noop})},672774:(e,t,n)=>{"use strict";n.d(t,{MiniInfoCell:()=>h});var r=n(300975),o=n(939844),i=n(243835),a=n(735567),s=n(93781),c=n(119360),l=n(780778),u=n(455833),d=n(795281),_=n(256631),p=["before","after","mode","textWrap","textLevel","children"],h=function(e){var t,n=(0,c.usePlatform)(),h=e.before,f=e.after,m=e.mode,v=e.textWrap,g=e.textLevel,y=e.children,E=(0,i.default)(e,p),w=!!E.onClick;return(0,a.createScopedElement)(d.default,(0,r.default)({Component:"div",disabled:!w,role:w?"button":null},E,{vkuiClass:(0,s.classNames)((0,l.getClassName)("MiniInfoCell",n),(t={},(0,o.default)(t,"MiniInfoCell--md-".concat(m),"base"!==m),(0,o.default)(t,"MiniInfoCell--wr-".concat(v),"nowrap"!==v),t),"MiniInfoCell--lvl-".concat(g))}),(0,a.createScopedElement)("span",{vkuiClass:"MiniInfoCell__icon"},h),(0,a.createScopedElement)(u.default,{vkuiClass:"MiniInfoCell__content",weight:"more"===m?"medium":"regular"},y),(0,_.hasReactNode)(f)&&(0,a.createScopedElement)("span",{vkuiClass:"MiniInfoCell__after"},f))};h.defaultProps={mode:"base",textWrap:"nowrap",textLevel:"secondary"}},239259:(e,t,n)=>{"use strict";n.d(t,{default:()=>E});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(93781),l=n(212602),u=n(362276),d=n(672705),_=n(811113),p=n(447737),h=n(504153),f=n(644029),m=n(48908),v=["icon","header","subheader","children","actions","actionsLayout","onClose","platform","viewWidth","viewHeight","hasMouse","nav"],g=(0,f.warnOnce)("ModalCard"),y=function(e){var t=e.icon,n=e.header,l=e.subheader,d=e.children,f=e.actions,y=e.actionsLayout,E=e.onClose,w=e.platform,b=e.viewWidth,C=e.viewHeight,S=e.hasMouse,T=(e.nav,(0,o.default)(e,v)),A=b>=u.ViewWidth.SMALL_TABLET&&(S||C>=u.ViewHeight.MEDIUM),D=a.useContext(_.default),P=(0,_.useModalRegistry)((0,h.getNavId)(e,g),p.ModalType.CARD).refs;return(0,i.createScopedElement)("div",(0,r.default)({},T,{vkuiClass:(0,c.classNames)((0,s.getClassName)("ModalCard",w),{"ModalCard--desktop":A})}),(0,i.createScopedElement)(m.ModalCardBase,{vkuiClass:"ModalCard__in",getRootRef:P.innerElement,icon:t,header:n,subheader:l,actions:f,actionsLayout:y,onClose:E||D.onClose},d))};y.defaultProps={actionsLayout:"horizontal"};const E=(0,d.withAdaptivity)((0,l.withPlatform)(y),{viewWidth:!0,viewHeight:!0,hasMouse:!0})},48908:(e,t,n)=>{"use strict";n.d(t,{ModalCardBase:()=>E});var r=n(300975),o=n(243835),i=n(735567),a=n(256631),s=n(931252),c=n(115446),l=n(93781),u=n(780778),d=n(119360),_=n(672705),p=n(362276),h=n(241073),f=n(108681),m=n(443890),v=n(713327),g=n(597636),y=["getRootRef","icon","header","subheader","children","actions","actionsLayout","viewWidth","hasMouse","viewHeight","onClose"],E=(0,_.withAdaptivity)((function(e){var t=e.getRootRef,n=e.icon,_=e.header,E=e.subheader,w=e.children,b=e.actions,C=e.actionsLayout,S=e.viewWidth,T=e.hasMouse,A=e.viewHeight,D=e.onClose,P=(0,o.default)(e,y),O=(0,d.usePlatform)(),I=S>=p.ViewWidth.SMALL_TABLET&&(T||A>=p.ViewHeight.MEDIUM),k=(0,g.useKeyboard)().isOpened,R=S>=p.ViewWidth.SMALL_TABLET,M=O===f.IOS&&!R;return(0,i.createScopedElement)("div",(0,r.default)({},P,{vkuiClass:(0,l.classNames)((0,u.getClassName)("ModalCardBase",O),{"ModalCardBase--desktop":I}),ref:t}),(0,i.createScopedElement)("div",{vkuiClass:(0,l.classNames)("ModalCardBase__container",{"ModalCardBase__container--softwareKeyboardOpened":k})},(0,a.hasReactNode)(n)&&(0,i.createScopedElement)("div",{vkuiClass:"ModalCardBase__icon"},n),(0,a.hasReactNode)(_)&&(0,i.createScopedElement)(s.default,{level:"2",weight:"semibold",vkuiClass:"ModalCardBase__header"},_),(0,a.hasReactNode)(E)&&(0,i.createScopedElement)(c.default,{weight:"regular",vkuiClass:"ModalCardBase__subheader"},E),w,(0,a.hasReactNode)(b)&&(0,i.createScopedElement)("div",{vkuiClass:(0,l.classNames)("ModalCardBase__actions",{"ModalCardBase__actions--v":"vertical"===C})},b),R&&(0,i.createScopedElement)(m.default,{onClick:D}),M&&(0,i.createScopedElement)(h.PanelHeaderButton,{vkuiClass:"ModalCard__dismiss",onClick:D},(0,i.createScopedElement)(v.default,null))))}),{viewWidth:!0,viewHeight:!0,hasMouse:!0})},443890:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(300975),o=n(735567),i=n(64107),a=n(795281),s=n(780778),c=n(119360),l=function(e){var t=(0,c.usePlatform)();return(0,o.createScopedElement)(a.default,(0,r.default)({vkuiClass:(0,s.getClassName)("ModalDismissButton",t)},e,{activeMode:"ModalDismissButton--active",hoverMode:"ModalDismissButton--hover"}),(0,o.createScopedElement)(i.default,null))};l.defaultProps={"aria-label":"Закрыть"};const u=l},489124:(e,t,n)=>{"use strict";n.d(t,{default:()=>w});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(93781),l=n(811113),u=n(119360),d=n(362276),_=n(672705),p=n(443890),h=n(256631),f=n(447737),m=n(504153),v=n(644029),g=["children","header","viewWidth","viewHeight","sizeX","hasMouse","onClose","settlingHeight","dynamicContentHeight","getModalContentRef","nav"],y=(0,v.warnOnce)("ModalPage"),E=function(e){var t=(0,u.usePlatform)(),n=a.useContext(l.ModalRootContext).updateModalHeight,_=e.children,v=e.header,E=e.viewWidth,w=e.viewHeight,b=e.sizeX,C=e.hasMouse,S=e.onClose,T=(e.settlingHeight,e.dynamicContentHeight,e.getModalContentRef),A=(e.nav,(0,o.default)(e,g));a.useEffect((function(){n()}),[_]);var D=E>=d.ViewWidth.SMALL_TABLET&&(C||w>=d.ViewHeight.MEDIUM),P=E>=d.ViewWidth.SMALL_TABLET,O=a.useContext(l.ModalRootContext),I=(0,l.useModalRegistry)((0,m.getNavId)(e,y),f.ModalType.PAGE).refs;return(0,i.createScopedElement)("div",(0,r.default)({},A,{vkuiClass:(0,c.classNames)((0,s.getClassName)("ModalPage",t),"ModalPage--sizeX-".concat(b),{"ModalPage--desktop":D})}),(0,i.createScopedElement)("div",{vkuiClass:"ModalPage__in-wrap",ref:I.innerElement},(0,i.createScopedElement)("div",{vkuiClass:"ModalPage__in"},(0,i.createScopedElement)("div",{vkuiClass:"ModalPage__header",ref:I.headerElement},v),(0,i.createScopedElement)("div",{vkuiClass:"ModalPage__content-wrap"},(0,i.createScopedElement)("div",{vkuiClass:"ModalPage__content",ref:(0,h.multiRef)(I.contentElement,T)},(0,i.createScopedElement)("div",{vkuiClass:"ModalPage__content-in"},_))),P&&(0,i.createScopedElement)(p.default,{onClick:S||O.onClose}))))};E.defaultProps={settlingHeight:75};const w=(0,_.withAdaptivity)(E,{viewWidth:!0,viewHeight:!0,sizeX:!0,hasMouse:!0})},72176:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(93781),c=n(119360),l=n(256631),u=n(108681),d=n(346921),_=n(324285),p=["left","right","children","separator","getRef"],h=function(e){var t=(0,c.usePlatform)(),n=(0,_.useAdaptivity)().sizeX,h=e.left,f=e.right,m=e.children,v=e.separator,g=e.getRef,y=(0,o.default)(e,p),E=(0,l.isPrimitiveReactNode)(m),w=v&&t===u.VKCOM;return(0,i.createScopedElement)("div",(0,r.default)({},y,{vkuiClass:(0,s.classNames)((0,a.getClassName)("ModalPageHeader",t),"ModalPageHeader--sizeX-".concat(n)),ref:g}),(0,i.createScopedElement)("div",{vkuiClass:"ModalPageHeader__in"},(0,i.createScopedElement)("div",{vkuiClass:"ModalPageHeader__left"},h),(0,i.createScopedElement)("div",{vkuiClass:"ModalPageHeader__content"},(0,i.createScopedElement)("div",{vkuiClass:"ModalPageHeader__content-in"},E?(0,i.createScopedElement)("span",null,m):m)),(0,i.createScopedElement)("div",{vkuiClass:"ModalPageHeader__right"},f)),w&&(0,i.createScopedElement)(d.default,{wide:!0,vkuiClass:"ModalPageHeader__separator"}))};h.defaultProps={separator:!0};const f=h},693962:(e,t,n)=>{"use strict";n.d(t,{ModalRootTouch:()=>B});var r=n(309919),o=n(243835),i=n(640137),a=n(101226),s=n(171178),c=n(351475),l=n(682754),u=n(939844),d=n(735567),_=n(667294),p=n(763029),h=n(196999),f=n(780778),m=n(93781),v=n(495358),g=n(970414),y=n(108681),E=n(23220),w=n(212602),b=n(18659),C=n(811113),S=n(766351),T=n(447737),A=n(901159),D=n(181498),P=n(504153),O=n(644029),I=n(843718),k=n(511571),R=["id"],M=(0,O.warnOnce)("ModalRoot");function L(e,t){return e>=t[0]&&e<=t[1]}function x(e){return Math.max(0,Math.min(98,e))}var N=function(e){(0,c.default)(n,e);var t=(0,l.default)(n);function n(e){var r;return(0,i.default)(this,n),r=t.call(this,e),(0,u.default)((0,s.default)(r),"documentScrolling",void 0),(0,u.default)((0,s.default)(r),"maskElementRef",void 0),(0,u.default)((0,s.default)(r),"viewportRef",_.createRef()),(0,u.default)((0,s.default)(r),"maskAnimationFrame",void 0),(0,u.default)((0,s.default)(r),"modalRootContext",void 0),(0,u.default)((0,s.default)(r),"frameIds",void 0),(0,u.default)((0,s.default)(r),"restoreFocusTo",void 0),(0,u.default)((0,s.default)(r),"preventTouch",(function(e){if(!e)return!1;for(;e.originalEvent;)e=e.originalEvent;return e.preventDefault&&e.preventDefault(),!1})),(0,u.default)((0,s.default)(r),"updateModalTranslate",(function(){var e=r.getModalState(r.props.activeModal);e&&r.animateTranslate(e,e.translateY)})),(0,u.default)((0,s.default)(r),"updateModalHeight",(function(){var e=r.getModalState(r.props.activeModal);e&&e.type===T.ModalType.PAGE&&e.dynamicContentHeight&&(r.props.enteringModal?r.waitTransitionFinish(e,(function(){requestAnimationFrame((function(){return r.checkPageContentHeight()}))})):requestAnimationFrame((function(){return r.checkPageContentHeight()})))})),(0,u.default)((0,s.default)(r),"onTouchMove",(function(e){if(!r.props.exitingModal){var t=r.getModalState(r.props.activeModal);if(t)return t.type===T.ModalType.PAGE?r.onPageTouchMove(e,t):t.type===T.ModalType.CARD?r.onCardTouchMove(e,t):void 0}})),(0,u.default)((0,s.default)(r),"onTouchEnd",(function(e){var t=r.getModalState(r.props.activeModal);return t.type===T.ModalType.PAGE?r.onPageTouchEnd(e,t):t.type===T.ModalType.CARD?r.onCardTouchEnd(e,t):void 0})),(0,u.default)((0,s.default)(r),"onScroll",(function(e){var t=r.props.activeModal,n=e.target;if(t){var o=r.getModalState(t);o.type===T.ModalType.PAGE&&o.contentElement.contains(n)&&(o.contentScrolled=!0,clearTimeout(o.contentScrollStopTimeout),o.contentScrollStopTimeout=setTimeout((function(){o.contentScrolled&&(o.contentScrolled=!1)}),250))}})),r.state={touchDown:!1,dragging:!1},r.maskElementRef=_.createRef(),r.modalRootContext={updateModalHeight:r.updateModalHeight,registerModal:function(e){var t=e.id,n=(0,o.default)(e,R);return Object.assign(r.getModalState(t),n)},onClose:function(){return r.props.closeActiveModal()},isInsideModal:!0},r.frameIds={},r}return(0,a.default)(n,[{key:"timeout",get:function(){return this.props.platform===y.ANDROID||this.props.platform===y.VKCOM?320:400}},{key:"document",get:function(){return this.props.document}},{key:"window",get:function(){return this.props.window}},{key:"getModalState",value:function(e){return this.props.getModalState(e)}},{key:"getModals",value:function(){return _.Children.toArray(this.props.children)}},{key:"componentDidMount",value:function(){this.props.platform===y.IOS&&this.window.addEventListener("resize",this.updateModalTranslate,!1)}},{key:"componentWillUnmount",value:function(){this.toggleDocumentScrolling(!0),this.window.removeEventListener("resize",this.updateModalTranslate,!1)}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.props.exitingModal&&this.props.exitingModal!==e.exitingModal&&this.closeModal(this.props.exitingModal),this.props.enteringModal&&this.props.enteringModal!==e.enteringModal){var n=this.props.enteringModal,r=this.getModalState(n);this.waitTransitionFinish(r,(function(){r.innerElement.style.transitionDelay=null,t.props.onEnter(n)})),r.innerElement.style.transitionDelay=this.props.delayEnter?"".concat(this.timeout,"ms"):null,this.animateTranslate(r,r.translateY)}this.props.activeModal&&!e.activeModal&&(this.restoreFocusTo=this.document.activeElement),this.props.activeModal||this.props.exitingModal||!this.restoreFocusTo||(this.restoreFocusTo.focus(),this.restoreFocusTo=null),this.toggleDocumentScrolling(!this.props.activeModal&&!this.props.exitingModal)}},{key:"toggleDocumentScrolling",value:function(e){this.documentScrolling!==e&&(this.documentScrolling=e,e?this.window.removeEventListener("touchmove",this.preventTouch,{passive:!1}):this.window.addEventListener("touchmove",this.preventTouch,{passive:!1}))}},{key:"checkPageContentHeight",value:function(){var e=this.getModalState(this.props.activeModal);if((null==e?void 0:e.type)===T.ModalType.PAGE&&null!=e&&e.modalElement){var t=(0,r.default)({},e);U(e);var n=(0,r.default)({},e),o=!1;t.expandable===n.expandable?t.translateYFrom!==n.translateYFrom&&(o=!0):o=!0,o&&this.animateTranslate(e,e.translateY)}}},{key:"closeModal",value:function(e){var t=this;this.setState({touchDown:!1});var n=this.getModalState(e);if(n){var r=this.getModalState(this.props.activeModal),o=!!r&&r.type===T.ModalType.PAGE,i=!!n&&n.type===T.ModalType.PAGE;this.waitTransitionFinish(n,(function(){return t.props.onExit(e)}));var a=i&&o&&n.translateY<=r.translateYFrom&&!this.props.isBack?r.translateYFrom+10:100;this.animateTranslate(n,a),r||this.setMaskOpacity(n,0)}else e&&M("[closeActiveModal] Modal ".concat(e," does not exist - not closing"))}},{key:"onPageTouchMove",value:function(e,t){var n=e.shiftY,r=e.originalEvent,o=r.target;if(e.isY){if(!t.innerElement.contains(o))return r.preventDefault();r.stopPropagation();var i=t.expandable,a=t.contentScrolled,s=t.collapsed,c=t.expanded;if(this.state.touchDown||(t.touchStartContentScrollTop=t.contentElement.scrollTop,this.setState({touchDown:!0})),!a&&(null===t.touchMovePositive&&(t.touchMovePositive=n>0),!t.expandable||s||c&&t.touchMovePositive&&0===t.touchStartContentScrollTop||t.headerElement.contains(o))){if(r.preventDefault(),!i&&n<0)return;!this.state.dragging&&this.setState({dragging:!0});var l=n/this.window.innerHeight*100,u=(0,g.rubber)(l,72,.8,this.props.platform===y.ANDROID||this.props.platform===y.VKCOM);t.touchShiftYPercent=l,t.translateYCurrent=x(t.translateY+u),this.animateTranslate(t,t.translateYCurrent),this.setMaskOpacity(t)}}else this.viewportRef.current.contains(o)&&r.preventDefault()}},{key:"onCardTouchMove",value:function(e,t){var n=e.originalEvent,r=e.shiftY,o=n.target;if(t.innerElement.contains(o)){this.state.touchDown||this.setState({touchDown:!0,dragging:!0});var i=r/t.innerElement.offsetHeight*100,a=(0,g.rubber)(i,72,1.2,this.props.platform===y.ANDROID||this.props.platform===y.VKCOM);t.touchShiftYPercent=i,t.translateYCurrent=Math.max(0,t.translateY+a),this.animateTranslate(t,t.translateYCurrent),this.setMaskOpacity(t)}}},{key:"onPageTouchEnd",value:function(e,t){var n,r=this,o=e.startY,i=e.shiftY;if(t.contentScrolled=!1,t.touchMovePositive=null,this.state.dragging){var a=(o+i)/this.window.innerHeight*100,s=t.translateYCurrent;s=x(s+s/e.duration*240*.6*(t.touchShiftYPercent<0?-1:1)),100!==(s=100!==t.settlingHeight?L(s,t.expandedRange)?t.expandedRange[0]:L(s,t.collapsedRange)?t.translateYFrom:L(s,t.hiddenRange)?100:t.translateYFrom:L(s,[0,25])?0:100)&&a>=75&&(s=100),t.translateY=s,t.translateYCurrent=s,t.collapsed=s>0&&s<a,t.expanded=0===s,t.hidden=100===s,t.hidden&&this.props.closeActiveModal(),n=function(){t.hidden||r.animateTranslate(t,t.translateY),r.setMaskOpacity(t)}}this.setState({touchDown:!1,dragging:!1},n)}},{key:"onCardTouchEnd",value:function(e,t){var n,r=this,o=e.duration;if(this.state.dragging){var i=t.translateYCurrent,a=i/o*240*.6*(t.touchShiftYPercent<0?-1:1);i=(i=Math.max(0,i+a))>=30?100:0,t.translateY=i,t.hidden=100===i,t.hidden&&this.props.closeActiveModal(),n=function(){t.hidden||r.animateTranslate(t,t.translateY),r.setMaskOpacity(t)}}this.setState({touchDown:!1,dragging:!1},n)}},{key:"waitTransitionFinish",value:function(e,t){if(E.transitionEvent.supported){e.innerElement.addEventListener(E.transitionEvent.name,(function n(){e.innerElement.removeEventListener(E.transitionEvent.name,n),t()}))}else setTimeout(t,this.timeout)}},{key:"animateTranslate",value:function(e,t){var n="animateTranslateFrame".concat(e.id);cancelAnimationFrame(this.frameIds[n]),this.frameIds[n]=requestAnimationFrame((function(){(0,v.setTransformStyle)(e.innerElement,"translate3d(0, ".concat(t,"%, 0)"))}))}},{key:"setMaskOpacity",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===n&&this.props.history[0]!==e.id||(cancelAnimationFrame(this.maskAnimationFrame),this.maskAnimationFrame=requestAnimationFrame((function(){if(t.maskElementRef.current){var r=e.translateY,o=e.translateYCurrent,i=null===n?1-(o-r)/(100-r)||0:n;t.maskElementRef.current.style.opacity=Math.max(0,Math.min(100,i)).toString()}})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.activeModal,o=t.exitingModal,i=t.enteringModal,a=this.state,s=a.touchDown,c=a.dragging;return n||o?(0,d.createScopedElement)(h.default.Provider,{value:!0},(0,d.createScopedElement)(C.default.Provider,{value:this.modalRootContext},(0,d.createScopedElement)(p.Touch,{vkuiClass:(0,m.classNames)((0,f.getClassName)("ModalRoot",this.props.platform),{"ModalRoot--vkapps":this.props.configProvider.webviewType===S.WebviewType.VKAPPS,"ModalRoot--touched":s,"ModalRoot--switching":!(!i&&!o)}),onMove:this.onTouchMove,onEnd:this.onTouchEnd,onScroll:this.onScroll},(0,d.createScopedElement)("div",{vkuiClass:"ModalRoot__mask",onClick:this.props.closeActiveModal,ref:this.maskElementRef}),(0,d.createScopedElement)("div",{vkuiClass:"ModalRoot__viewport",ref:this.viewportRef},this.getModals().map((function(t){var a=(0,P.getNavId)(t.props,M);if(a!==n&&a!==o)return null;var s=(0,r.default)({},e.getModalState(a)),l=s.type===T.ModalType.PAGE,u="modal-".concat(a);return(0,d.createScopedElement)(I.FocusTrap,{key:u,getRootRef:function(t){return e.getModalState(a).modalElement=t},onClose:e.props.closeActiveModal,timeout:e.timeout,vkuiClass:(0,m.classNames)("ModalRoot__modal",{"ModalRoot__modal--active":a===n,"ModalRoot__modal--prev":a===o,"ModalRoot__modal--next":o&&a===n||a===i,"ModalRoot__modal--dragging":c,"ModalRoot__modal--expandable":l&&s.expandable,"ModalRoot__modal--expanded":l&&s.expanded,"ModalRoot__modal--collapsed":l&&s.collapsed}),restoreFocus:!1},t)})))))):null}}]),n}(_.Component),B=(0,b.withContext)((0,w.withPlatform)((0,D.withDOM)((0,k.withModalManager)((function(e){switch(e.type){case T.ModalType.PAGE:return e.settlingHeight=e.settlingHeight||A.MODAL_PAGE_DEFAULT_PERCENT_HEIGHT,U(e);case T.ModalType.CARD:return function(e){e.translateY=0}(e)}}))(N))),S.ConfigProviderContext,"configProvider");function U(e){var t=e.contentElement,n=t.firstElementChild.offsetHeight,r=e.translateY;e.expandable=n>t.clientHeight||100===e.settlingHeight;var o,i,a,s,c,l=!1,u=!1;if(e.expandable){var d=(o=100-e.settlingHeight)/2,_=100-o;a=[0,d],s=[d,o+_/4],c=[o+_/4,100],l=o>0,u=o<=0,i=o}else{a=[i=o=100-(n+e.headerElement.offsetHeight)/e.innerElement.parentElement.offsetHeight*100,i+25],s=[i+25,i+25],c=[i+25,i+100]}(e.expandable&&i>r||100===e.settlingHeight)&&(i=0),e.expandedRange=a,e.collapsedRange=s,e.hiddenRange=c,e.translateY=i,e.translateYFrom=o,e.collapsed=l,e.expanded=u}},7075:(e,t,n)=>{"use strict";n.d(t,{ModalRoot:()=>l});var r=n(735567),o=n(362276),i=n(672705),a=n(693962),s=n(973516),c=function(e){var t=e.viewWidth,n=e.viewHeight,i=e.hasMouse,c=t>=o.ViewWidth.SMALL_TABLET&&(i||n>=o.ViewHeight.MEDIUM)?s.ModalRootDesktop:a.ModalRootTouch;return(0,r.createScopedElement)(c,e)};c.displayName="ModalRoot";var l=(0,i.withAdaptivity)(c,{viewWidth:!0,viewHeight:!0,hasMouse:!0})},811113:(e,t,n)=>{"use strict";n.d(t,{ModalRootContext:()=>s,useModalRegistry:()=>c,default:()=>l});var r=n(939844),o=n(309919),i=n(667294),a=n(214542),s=i.createContext({updateModalHeight:function(){},registerModal:function(){},isInsideModal:!1});function c(e,t){var n=i.useContext(s),c=i.useRef({}).current;return(0,a.useIsomorphicLayoutEffect)((function(){n.registerModal((0,o.default)((0,o.default)({},c),{},{type:t,id:e}));var i=Object.keys(c).reduce((function(e,t){return(0,o.default)((0,o.default)({},e),{},(0,r.default)({},t,null))}),{type:t,id:e});return function(){return n.registerModal(i)}}),[]),{refs:i.useRef({modalElement:function(e){return c.modalElement=e},innerElement:function(e){return c.innerElement=e},headerElement:function(e){return c.headerElement=e},contentElement:function(e){return c.contentElement=e}}).current}}const l=s},973516:(e,t,n)=>{"use strict";n.d(t,{ModalRootDesktop:()=>P});var r=n(243835),o=n(640137),i=n(101226),a=n(171178),s=n(351475),c=n(682754),l=n(939844),u=n(735567),d=n(667294),_=n(93781),p=n(23220),h=n(212602),f=n(18659),m=n(811113),v=n(766351),g=n(108681),y=n(780778),E=n(181498),w=n(504153),b=n(644029),C=n(843718),S=n(511571),T=["id"],A=(0,b.warnOnce)("ModalRoot"),D=function(e){(0,s.default)(n,e);var t=(0,c.default)(n);function n(e){var i;return(0,o.default)(this,n),i=t.call(this,e),(0,l.default)((0,a.default)(i),"maskElementRef",void 0),(0,l.default)((0,a.default)(i),"maskAnimationFrame",void 0),(0,l.default)((0,a.default)(i),"modalRootContext",void 0),(0,l.default)((0,a.default)(i),"restoreFocusTo",void 0),i.maskElementRef=d.createRef(),i.modalRootContext={updateModalHeight:function(){},registerModal:function(e){var t=e.id,n=(0,r.default)(e,T);return Object.assign(i.getModalState(t),n)},onClose:function(){return i.props.closeActiveModal()},isInsideModal:!0},i}return(0,i.default)(n,[{key:"timeout",get:function(){return this.props.platform===g.ANDROID||this.props.platform===g.VKCOM?320:400}},{key:"modals",get:function(){return d.Children.toArray(this.props.children)}},{key:"getModalState",value:function(e){return this.props.getModalState(e)}},{key:"componentDidUpdate",value:function(e){var t=this;if(this.props.exitingModal&&this.props.exitingModal!==e.exitingModal&&this.closeModal(this.props.exitingModal),this.props.enteringModal&&this.props.enteringModal!==e.enteringModal){var n=this.props.enteringModal,r=this.getModalState(n);requestAnimationFrame((function(){t.props.enteringModal===n&&(t.waitTransitionFinish(r,(function(){return t.props.onEnter(n)})),t.animateModalOpacity(r,!0))}))}this.props.activeModal&&!e.activeModal&&(this.restoreFocusTo=this.props.document.activeElement),this.props.activeModal||this.props.exitingModal||!this.restoreFocusTo||(this.restoreFocusTo.focus(),this.restoreFocusTo=null)}},{key:"closeModal",value:function(e){var t=this,n=this.getModalState(e);n&&(this.waitTransitionFinish(n,(function(){return t.props.onExit(e)})),this.animateModalOpacity(n,!1),this.props.activeModal||this.setMaskOpacity(n,0))}},{key:"waitTransitionFinish",value:function(e,t){if(p.transitionEvent.supported){e.innerElement.addEventListener(p.transitionEvent.name,(function n(){e.innerElement.removeEventListener(p.transitionEvent.name,n),t()}))}else setTimeout(t,this.timeout)}},{key:"animateModalOpacity",value:function(e,t){e.innerElement.style.transitionDelay=t&&this.props.delayEnter?"".concat(this.timeout,"ms"):null,e.innerElement.style.opacity=t?"1":"0"}},{key:"setMaskOpacity",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===n&&this.props.history[0]!==e.id||(cancelAnimationFrame(this.maskAnimationFrame),this.maskAnimationFrame=requestAnimationFrame((function(){if(t.maskElementRef.current){var r=e.translateY,o=e.translateYCurrent,i=null===n?1-(o-r)/(100-r)||0:n;t.maskElementRef.current.style.opacity=Math.max(0,Math.min(100,i)).toString()}})))}},{key:"render",value:function(){var e=this,t=this.props,n=t.exitingModal,r=t.activeModal,o=t.enteringModal;return r||n?(0,u.createScopedElement)(m.default.Provider,{value:this.modalRootContext},(0,u.createScopedElement)("div",{vkuiClass:(0,_.classNames)((0,y.getClassName)("ModalRoot",this.props.platform),{"ModalRoot--vkapps":this.props.configProvider.webviewType===v.WebviewType.VKAPPS},"ModalRoot--desktop")},(0,u.createScopedElement)("div",{vkuiClass:"ModalRoot__mask",ref:this.maskElementRef,onClick:this.props.closeActiveModal}),(0,u.createScopedElement)("div",{vkuiClass:"ModalRoot__viewport"},this.modals.map((function(t){var i=(0,w.getNavId)(t.props,A);if(i!==r&&i!==n)return null;var a="modal-".concat(i);return(0,u.createScopedElement)(C.FocusTrap,{restoreFocus:!1,onClose:e.props.closeActiveModal,timeout:e.timeout,key:a,vkuiClass:(0,_.classNames)("ModalRoot__modal",{"ModalRoot__modal--active":!n&&!o&&i===r,"ModalRoot__modal--prev":i===n,"ModalRoot__modal--next":n&&i===r})},t)}))))):null}}]),n}(d.Component),P=(0,f.withContext)((0,h.withPlatform)((0,E.withDOM)((0,S.withModalManager)()(D))),v.ConfigProviderContext,"configProvider")},901159:(e,t,n)=>{"use strict";n.d(t,{MODAL_PAGE_DEFAULT_PERCENT_HEIGHT:()=>r});var r=75},447737:(e,t,n)=>{"use strict";var r;n.d(t,{ModalType:()=>r}),function(e){e.PAGE="page",e.CARD="card"}(r||(r={}))},511571:(e,t,n)=>{"use strict";n.d(t,{withModalManager:()=>g});var r=n(300975),o=n(46008),i=n(309919),a=n(239626),s=n(735567),c=n(667294),l=n(447737),u=n(644029),d=n(504153),_=n(214542),p=n(256631);function h(e){return c.Children.toArray(e)}var f=(0,u.warnOnce)("ModalRoot");function m(e,t){if("setActive"===t.type&&t.id!==e.activeModal){var n=t.id,r=e.exitingModal||e.activeModal,o=(0,a.default)(e.history),s=o.includes(n);return null===n?o=[]:s?o=o.splice(0,o.indexOf(n)+1):o.push(n),{activeModal:n,enteringModal:null,exitingModal:r,history:o,isBack:s}}return"entered"===t.type&&t.id===e.enteringModal?(0,i.default)((0,i.default)({},e),{},{enteringModal:null}):"exited"===t.type&&t.id===e.exitingModal?(0,i.default)((0,i.default)({},e),{},{exitingModal:null}):"inited"===t.type&&t.id===e.activeModal?(0,i.default)((0,i.default)({},e),{},{enteringModal:t.id}):e}function v(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:p.noop,a=c.useRef({}).current;h(t).forEach((function(e){var t=e.props,n=(0,d.getNavId)(t,f),r=a[n]||{id:n};r.onClose=e.props.onClose,r.dynamicContentHeight=!!t.dynamicContentHeight,"number"==typeof t.settlingHeight&&(r.settlingHeight=t.settlingHeight),a[r.id]=r}));var s=e&&!a[e],u=s?null:e,v=c.useReducer(m,{activeModal:u,enteringModal:null,exitingModal:null,history:u?[u]:[],isBack:!1}),g=(0,o.default)(v,2),y=g[0],E=g[1];(0,_.useIsomorphicLayoutEffect)((function(){E({type:"setActive",id:u})}),[e]),(0,_.useIsomorphicLayoutEffect)((function(){y.activeModal&&(r(a[y.activeModal]),E({type:"inited",id:y.activeModal}))}),[y.activeModal]);var w=function(e){var t;return(null===(t=a[e])||void 0===t?void 0:t.type)===l.ModalType.CARD},b=c.useCallback((function(e){return E({type:"entered",id:e})}),[]),C=c.useCallback((function(e){return E({type:"exited",id:e})}),[]),S=Boolean(y.exitingModal&&(w(e)||w(y.exitingModal))),T=c.useCallback((function(e){return a[e]}),[]);function A(){var e=a[y.activeModal];e&&((0,p.isFunction)(e.onClose)?e.onClose():(0,p.isFunction)(n)&&n(e.id))}return(0,i.default)((0,i.default)({onEnter:b,onExit:C},y),{},{delayEnter:S,getModalState:T,closeActiveModal:A})}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p.noop;return function(t){return function(n){var o=v(n.activeModal,n.children,n.onClose,e);return(0,s.createScopedElement)(t,(0,r.default)({},n,o))}}}},456423:(e,t,n)=>{"use strict";n.d(t,{withModalRootContext:()=>s});var r=n(300975),o=n(735567),i=n(667294),a=n(811113);function s(e){return function(t){var n=i.useContext(a.default).updateModalHeight;return(0,o.createScopedElement)(e,(0,r.default)({},t,{updateModalHeight:n}))}}},451155:(e,t,n)=>{"use strict";n.d(t,{default:()=>C});var r=n(300975),o=n(939844),i=n(46008),a=n(243835),s=n(735567),c=n(667294),l=n(93781),u=n(91742),d=n(937188),_=n(362276),p=n(672705),h=n(780778),f=n(115446),m=n(455833),v=n(108681),g=n(214542),y=n(678988),E=n(428253),w=n(119360),b=["style","defaultValue","align","placeholder","children","className","getRef","getRootRef","disabled","sizeX","sizeY","multiline"];const C=(0,p.withAdaptivity)((function(e){var t,n=e.style,p=e.defaultValue,C=void 0===p?"":p,S=e.align,T=e.placeholder,A=e.children,D=e.className,P=e.getRef,O=e.getRootRef,I=e.disabled,k=e.sizeX,R=e.sizeY,M=e.multiline,L=(0,a.default)(e,b),x=(0,w.usePlatform)(),N=c.useState(""),B=(0,i.default)(N,2),U=B[0],F=B[1],W=c.useState(!1),V=(0,i.default)(W,2),H=V[0],j=V[1],K=(0,y.useEnsuredControl)(L,{defaultValue:C}),z=(0,i.default)(K,2),G=z[0],q=z[1],Y=(0,E.useExternRef)(P);(0,g.useIsomorphicLayoutEffect)((function(){var e=Y.current.options[Y.current.selectedIndex];e&&(F(e.text),j(""===e.value&&null!=T))}),[G,A]);var $=x===v.VKCOM||R===_.SizeType.COMPACT?m.default:f.default;return(0,s.createScopedElement)(d.FormField,{Component:"label",vkuiClass:(0,l.classNames)((0,h.getClassName)("Select",x),(t={},(0,o.default)(t,"Select--not-selected",H),(0,o.default)(t,"Select--align-".concat(S),!!S),(0,o.default)(t,"Select--sizeX--".concat(k),!!k),(0,o.default)(t,"Select--sizeY--".concat(R),!!R),(0,o.default)(t,"Select--multiline",M),t)),className:D,style:n,getRootRef:O,disabled:I,after:(0,s.createScopedElement)(u.DropdownIcon,null)},(0,s.createScopedElement)("select",(0,r.default)({},L,{disabled:I,vkuiClass:"Select__el",onChange:q,value:G,ref:Y}),T&&(0,s.createScopedElement)("option",{value:""},T),A),(0,s.createScopedElement)($,{Component:"div",weight:"regular",vkuiClass:"Select__container"},(0,s.createScopedElement)("span",{vkuiClass:"Select__title"},U)))}),{sizeX:!0,sizeY:!0})},119501:(e,t,n)=>{"use strict";n.d(t,{useNavTransition:()=>s,NavTransitionProvider:()=>c});var r=n(735567),o=n(667294),i=n(854193),a=o.createContext({entering:!1}),s=function(){return o.useContext(a)},c=function(e){var t=e.children,n=e.entering,o=s(),c=(0,i.useObjectMemo)({entering:o.entering||n});return(0,r.createScopedElement)(a.Provider,{value:c},t)}},623796:(e,t,n)=>{"use strict";n.d(t,{Panel:()=>f});var r=n(300975),o=n(939844),i=n(243835),a=n(735567),s=n(780778),c=n(93781),l=n(763029),u=n(566506),d=n(672705),_=n(108681),p=n(119360),h=["centered","children","getRootRef","sizeX","nav"],f=(0,d.withAdaptivity)((function(e){var t=e.centered,n=void 0!==t&&t,d=e.children,f=e.getRootRef,m=e.sizeX,v=(e.nav,(0,i.default)(e,h)),g=(0,p.usePlatform)();return(0,a.createScopedElement)("div",(0,r.default)({},v,{ref:f,vkuiClass:(0,c.classNames)((0,s.getClassName)("Panel",g),"Panel--".concat(m),(0,o.default)({"Panel--centered":n},"Panel--sizeX-".concat(m),!0))}),(0,a.createScopedElement)(l.Touch,{Component:u.TooltipContainer,vkuiClass:"Panel__in"},g===_.IOS&&(0,a.createScopedElement)("div",{vkuiClass:"Panel__fade"}),(0,a.createScopedElement)("div",{vkuiClass:"Panel__in-before"}),n?(0,a.createScopedElement)("div",{vkuiClass:"Panel__centered"},d):d,(0,a.createScopedElement)("div",{vkuiClass:"Panel__in-after"})))}),{sizeX:!0})},582405:(e,t,n)=>{"use strict";n.d(t,{default:()=>C});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(119360),c=n(780778),l=n(93781),u=n(781959),d=n(346921),_=n(108681),p=n(766351),h=n(362276),f=n(672705),m=n(256631),v=n(455833),g=n(566506),y=["left","children","right","separator","visor","transparent","shadow","getRef","getRootRef","sizeX","sizeY","fixed"],E=function(e){var t=e.children;return(0,s.usePlatform)()===_.VKCOM?(0,i.createScopedElement)(v.default,{weight:"medium"},t):(0,i.createScopedElement)("span",{vkuiClass:"PanelHeader__content-in"},t)},w=function(e){var t=e.children,n=e.left,r=e.right,o=a.useContext(p.ConfigProviderContext).webviewType,s=(0,m.isPrimitiveReactNode)(t);return(0,i.createScopedElement)(g.TooltipContainer,{fixed:!0,vkuiClass:"PanelHeader__in"},(0,i.createScopedElement)("div",{vkuiClass:"PanelHeader__left"},n),(0,i.createScopedElement)("div",{vkuiClass:"PanelHeader__content"},s?(0,i.createScopedElement)(E,null,t):t),(0,i.createScopedElement)("div",{vkuiClass:"PanelHeader__right"},o!==p.WebviewType.VKAPPS&&r))},b=function(e){var t=e.left,n=(e.children,e.right),f=e.separator,m=e.visor,v=e.transparent,g=e.shadow,E=e.getRef,b=e.getRootRef,C=e.sizeX,S=(e.sizeY,e.fixed),T=(0,o.default)(e,y),A=(0,s.usePlatform)(),D=a.useContext(p.ConfigProviderContext).webviewType,P=g&&C===h.SizeType.REGULAR,O=void 0!==S?S:A!==_.Platform.VKCOM;return(0,i.createScopedElement)("div",(0,r.default)({},T,{vkuiClass:(0,l.classNames)((0,c.getClassName)("PanelHeader",A),{"PanelHeader--trnsp":v,"PanelHeader--shadow":P,"PanelHeader--vis":m,"PanelHeader--sep":f&&m,"PanelHeader--vkapps":D===p.WebviewType.VKAPPS,"PanelHeader--no-left":!t,"PanelHeader--no-right":!n,"PanelHeader--fixed":O},"PanelHeader--sizeX-".concat(C)),ref:O?b:E}),O?(0,i.createScopedElement)(u.default,{vkuiClass:"PanelHeader__fixed",vertical:"top",getRootRef:E},(0,i.createScopedElement)(w,e)):(0,i.createScopedElement)(w,e),f&&m&&A!==_.VKCOM&&(0,i.createScopedElement)(d.default,{vkuiClass:"PanelHeader__separator",expanded:C===h.SizeType.REGULAR}))};b.defaultProps={separator:!0,transparent:!1,visor:!0};const C=(0,f.withAdaptivity)(b,{sizeX:!0,sizeY:!0})},550360:(e,t,n)=>{"use strict";n.d(t,{default:()=>y});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(364379),c=n(329524),l=n(111445),u=n(241073),d=n(108681),_=n(119360),p=n(362276),h=n(672705),f=n(780778),m=n(93781),v=["label","sizeX"],g=function(e){var t=e.label,n=e.sizeX,a=(0,o.default)(e,v),h=(0,_.usePlatform)(),g=h===d.VKCOM||h===d.IOS&&n===p.SizeType.REGULAR;return(0,i.createScopedElement)(u.PanelHeaderButton,(0,r.default)({},a,{vkuiClass:(0,m.classNames)((0,f.getClassName)("PanelHeaderBack",h),{"PanelHeaderBack--has-label":g&&!!t}),label:g&&t}),h===d.ANDROID&&(0,i.createScopedElement)(s.default,null),h===d.VKCOM&&(0,i.createScopedElement)(c.default,null),h===d.IOS&&(0,i.createScopedElement)(l.default,null))};g.defaultProps={"aria-label":"Назад"};const y=a.memo((0,h.withAdaptivity)(g,{sizeX:!0}))},241073:(e,t,n)=>{"use strict";n.d(t,{PanelHeaderButton:()=>m});var r=n(300975),o=n(243835),i=n(735567),a=n(795281),s=n(780778),c=n(93781),l=n(119360),u=n(256631),d=n(108681),_=n(455833),p=n(931252),h=["children","primary","label"],f=function(e){var t=e.primary,n=e.children,r=(0,l.usePlatform)();return r===d.IOS?(0,i.createScopedElement)(p.default,{Component:"span",level:"3",weight:t?"semibold":"regular"},n):(0,i.createScopedElement)(_.default,{weight:r===d.VKCOM?"regular":"medium"},n)},m=function(e){var t,n,_=e.children,p=e.primary,m=e.label,v=(0,o.default)(e,h),g=(0,u.isPrimitiveReactNode)(_),y=(0,u.isPrimitiveReactNode)(m),E=(0,l.usePlatform)();switch(E){case d.ANDROID:t="background",n="background";break;case d.IOS:t="background",n="opacity";break;case d.VKCOM:t="PanelHeaderButton--hover",n="PanelHeaderButton--active"}return(0,i.createScopedElement)(a.default,(0,r.default)({},v,{hoverMode:t,Component:v.href?"a":"button",activeEffectDelay:200,activeMode:n,vkuiClass:(0,c.classNames)((0,s.getClassName)("PanelHeaderButton",E),{"PanelHeaderButton--primary":p,"PanelHeaderButton--primitive":g,"PanelHeaderButton--notPrimitive":!g&&!y})}),g?(0,i.createScopedElement)(f,{primary:p},_):_,y?(0,i.createScopedElement)(f,{primary:p},m):m)};m.defaultProps={primary:!1,"aria-label":"Закрыть"}},944888:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(656294),s=n(241073),c=n(108681),l=n(256631),u=n(119360),d=["children"],_=function(e){var t=e.children,n=(0,o.default)(e,d),_=(0,u.usePlatform)();return(0,i.createScopedElement)(s.PanelHeaderButton,(0,r.default)({"aria-label":(0,l.getTitleFromChildren)(t)},n),_===c.ANDROID||_===c.VKCOM?(0,i.createScopedElement)(a.default,null):t)};_.defaultProps={children:"Отмена"};const p=_},994240:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var r=n(300975),o=n(309919),i=n(243835),a=n(735567),s=n(780778),c=n(795281),l=n(119360),u=n(256631),d=n(443910),_=n(115446),p=n(108681),h=["className","style","aside","status","before","children","onClick"];const f=function(e){var t=e.className,n=e.style,f=e.aside,m=e.status,v=e.before,g=e.children,y=e.onClick,E=(0,i.default)(e,h),w=y?c.default:"div",b=y?{}:E,C=(0,l.usePlatform)(),S=y?(0,o.default)((0,o.default)({},E),{},{onClick:y,activeEffectDelay:200,hasActive:C===p.IOS,activeMode:"opacity"}):{},T=(0,s.getClassName)("PanelHeaderContent",C);return(0,a.createScopedElement)("div",(0,r.default)({},b,{vkuiClass:T,style:n,className:t}),(0,u.hasReactNode)(v)&&(0,a.createScopedElement)("div",{vkuiClass:"PanelHeaderContent__before"},v),(0,a.createScopedElement)(w,(0,r.default)({},S,{vkuiClass:"PanelHeaderContent__in"}),(0,u.hasReactNode)(m)&&(0,a.createScopedElement)(d.default,{level:"1",weight:"regular",vkuiClass:"PanelHeaderContent__status"},m),(0,a.createScopedElement)("div",{vkuiClass:"PanelHeaderContent__children"},(0,u.hasReactNode)(m)?(0,a.createScopedElement)(_.default,{Component:"span",weight:"medium"},g):(0,a.createScopedElement)("span",{vkuiClass:"PanelHeaderContent__children-in"},g),(0,u.hasReactNode)(f)&&(0,a.createScopedElement)("div",{vkuiClass:"PanelHeaderContent__aside"},f)),(0,u.hasReactNode)(v)&&(0,a.createScopedElement)("div",{vkuiClass:"PanelHeaderContent__width"})))}},961928:(e,t,n)=>{"use strict";n.d(t,{PanelHeaderContext:()=>y});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(781959),l=n(93781),u=n(780778),d=n(362276),_=n(324285),p=n(181498),h=n(214542),f=n(283821),m=n(855356),v=n(119360),g=["children","onClose","opened"],y=function(e){var t=e.children,n=e.onClose,y=e.opened,E=void 0!==y&&y,w=(0,i.default)(e,g),b=(0,p.useDOM)().document,C=(0,v.usePlatform)(),S=s.useState(E),T=(0,o.default)(S,2),A=T[0],D=T[1],P=A&&!E,O=(0,_.useAdaptivity)().viewWidth>=d.ViewWidth.SMALL_TABLET,I=s.useRef();(0,h.useIsomorphicLayoutEffect)((function(){E&&D(!0)}),[E]),(0,f.useGlobalEventListener)(b,"click",O&&E&&!P&&function(e){I.current&&!I.current.contains(e.target)&&n()});var k=function(){return D(!1)},R=(0,m.useTimeout)(k,200);return s.useEffect((function(){return P?R.set():R.clear()}),[P]),(0,a.createScopedElement)(c.default,(0,r.default)({},w,{vkuiClass:(0,l.classNames)((0,u.getClassName)("PanelHeaderContext",C),{"PanelHeaderContext--opened":E,"PanelHeaderContext--closing":P,"PanelHeaderContext--desktop":O}),vertical:"top"}),(0,a.createScopedElement)("div",{vkuiClass:"PanelHeaderContext__in",ref:I,onAnimationEnd:P?k:null},(0,a.createScopedElement)("div",{vkuiClass:"PanelHeaderContext__content"},A&&t)),!O&&A&&(0,a.createScopedElement)("div",{onClick:n,vkuiClass:"PanelHeaderContext__fade"}))}},959488:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(241073),s=n(108681),c=n(451751),l=n(527262),u=n(119360),d=["isActive","editLabel","doneLabel"],_=function(e){var t=e.isActive,n=e.editLabel,_=e.doneLabel,p=(0,o.default)(e,d),h=t?_:n,f=t?c.default:l.default,m=(0,u.usePlatform)();return(0,i.createScopedElement)(a.PanelHeaderButton,(0,r.default)({"aria-label":h},p),m===s.ANDROID||m===s.VKCOM?(0,i.createScopedElement)(f,null):h)};_.defaultProps={isActive:!1,editLabel:"Редактировать",doneLabel:"Готово"};const p=_},723552:(e,t,n)=>{"use strict";n.d(t,{default:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(241073),s=n(451751),c=n(108681),l=n(119360),u=n(256631),d=["children"],_=function(e){var t=e.children,n=(0,o.default)(e,d),_=(0,l.usePlatform)();return(0,i.createScopedElement)(a.PanelHeaderButton,(0,r.default)({"aria-label":(0,u.getTitleFromChildren)(t),primary:!0},n),_===c.ANDROID||_===c.VKCOM?(0,i.createScopedElement)(s.default,null):t)};_.defaultProps={children:"Готово"};const p=_},749967:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var r=n(300975),o=n(309919),i=n(243835),a=n(735567),s=n(667294),c=n(474353),l=["height","style"],u=function(e){var t=e.height,n=e.style,s=(0,i.default)(e,l);return(0,a.createScopedElement)(c.default,(0,r.default)({size:"regular"},s,{style:(0,o.default)({height:t},n)}))};u.defaultProps={height:96};const d=s.memo(u)},729814:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var r=n(300975),o=n(243835),i=n(735567),a=n(93781),s=n(256631),c=n(931252),l=n(115446),u=["icon","header","action","children","stretched","getRootRef"];const d=function(e){var t=e.icon,n=e.header,d=e.action,_=e.children,p=e.stretched,h=e.getRootRef,f=(0,o.default)(e,u);return(0,i.createScopedElement)("div",(0,r.default)({},f,{ref:h,vkuiClass:(0,a.classNames)("Placeholder",{"Placeholder--stretched":p})}),(0,i.createScopedElement)("div",{vkuiClass:"Placeholder__in"},(0,s.hasReactNode)(t)&&(0,i.createScopedElement)("div",{vkuiClass:"Placeholder__icon"},t),(0,s.hasReactNode)(n)&&(0,i.createScopedElement)(c.default,{level:"2",weight:"medium",vkuiClass:"Placeholder__header"},n),(0,s.hasReactNode)(_)&&(0,i.createScopedElement)(l.default,{weight:"regular",vkuiClass:"Placeholder__text"},_),(0,s.hasReactNode)(d)&&(0,i.createScopedElement)("div",{vkuiClass:"Placeholder__action"},d)))}},311323:(e,t,n)=>{"use strict";n.d(t,{PopoutRoot:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(362276),c=n(672705),l=n(645083),u=n(181498),d=["popout","modal","viewWidth","viewHeight","hasMouse","children","getRootRef"],_=function(e){var t=e.popout,n=e.modal,c=e.viewWidth,_=e.viewHeight,p=e.hasMouse,h=e.children,f=e.getRootRef,m=(0,o.default)(e,d),v=(0,u.useDOM)().document,g=c>=s.ViewWidth.SMALL_TABLET&&(p||_>=s.ViewHeight.MEDIUM);return a.useEffect((function(){t&&(0,u.blurActiveElement)(v)}),[!!t]),(0,i.createScopedElement)("div",(0,r.default)({},m,{vkuiClass:"PopoutRoot",ref:f}),h,(0,i.createScopedElement)(l.AppRootPortal,null,!!t&&(0,i.createScopedElement)("div",{vkuiClass:g?"PopoutRoot--absolute":"PopoutRoot__popout"},t),!!n&&(0,i.createScopedElement)("div",{vkuiClass:"PopoutRoot__modal"},n)))};_.displayName="PopoutRoot";var p=(0,c.withAdaptivity)(_,{viewWidth:!0,viewHeight:!0,hasMouse:!0})},949444:(e,t,n)=>{"use strict";n.d(t,{PopoutWrapper:()=>m});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(780778),l=n(93781),u=n(108681),d=n(855356),_=n(119360),p=n(283821),h=n(181498),f=["alignY","alignX","closing","hasMask","fixed","children","onClick"],m=function(e){var t=e.alignY,n=void 0===t?"center":t,m=e.alignX,v=void 0===m?"center":m,g=e.closing,y=void 0!==g&&g,E=e.hasMask,w=void 0===E||E,b=e.fixed,C=void 0===b||b,S=e.children,T=e.onClick,A=(0,i.default)(e,f),D=(0,_.usePlatform)(),P=s.useState(!w),O=(0,o.default)(P,2),I=O[0],k=O[1],R=s.useRef(),M=function(e){e&&"vkui-animation-full-fade-in"!==e.animationName||k(!0)},L=(0,d.useTimeout)(M,D===u.IOS?300:200);s.useEffect((function(){!I&&L.set()}),[]);var x=(0,h.useDOM)().window;(0,p.useGlobalEventListener)(x,"touchmove",(function(e){return e.preventDefault()}),{passive:!1});var N=(0,c.getClassName)("PopoutWrapper",D);return(0,a.createScopedElement)("div",(0,r.default)({},A,{vkuiClass:(0,l.classNames)(N,"PopoutWrapper--v-".concat(n),"PopoutWrapper--h-".concat(v),{"PopoutWrapper--closing":y,"PopoutWrapper--opened":I,"PopoutWrapper--fixed":C,"PopoutWrapper--masked":w}),onAnimationEnd:I?null:M,ref:R}),(0,a.createScopedElement)("div",{vkuiClass:"PopoutWrapper__container"},(0,a.createScopedElement)("div",{vkuiClass:"PopoutWrapper__overlay",onClick:T}),(0,a.createScopedElement)("div",{vkuiClass:"PopoutWrapper__content"},S)))}},571042:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(119360),c=["value","getRootRef"],l=function(e){var t=e.value,n=e.getRootRef,l=(0,o.default)(e,c),u=(0,s.usePlatform)(),d=Math.max(0,Math.min(t,100));return(0,i.createScopedElement)("div",(0,r.default)({"aria-valuenow":t},l,{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,ref:n,vkuiClass:(0,a.getClassName)("Progress",u)}),(0,i.createScopedElement)("div",{vkuiClass:"Progress__bg","aria-hidden":"true"}),(0,i.createScopedElement)("div",{vkuiClass:"Progress__in",style:{width:"".concat(d,"%")},"aria-hidden":"true"}))};l.defaultProps={value:0};const u=l},85958:(e,t,n)=>{"use strict";n.d(t,{default:()=>g});var r=n(300975),o=n(939844),i=n(309919),a=n(46008),s=n(243835),c=n(735567),l=n(667294),u=n(713327),d=n(658113),_=n(426305),p=n(900863),h=n(443910),f=n(119360),m=n(780778),v=["bannerData","onClose"];const g=function(e){var t=(0,f.usePlatform)(),n=e.bannerData,g=void 0===n?{}:n,y=(e.onClose,(0,s.default)(e,v)),E=null!=g.ageRestrictions?parseInt(g.ageRestrictions):g.ageRestriction,w=l.useState(""),b=(0,a.default)(w,2),C=b[0],S=b[1],T=l.useMemo((function(){return g.statistics?g.statistics.reduce((function(e,t){return(0,i.default)((0,i.default)({},e),{},(0,o.default)({},t.type,t.url))}),{}):{}}),[g.statistics]),A=l.useCallback((function(){return S(T.click||"")}),[T.click]);return l.useEffect((function(){T.playbackStarted&&S(T.playbackStarted)}),[T.playbackStarted]),(0,c.createScopedElement)("div",(0,r.default)({vkuiClass:(0,m.getClassName)("PromoBanner",t)},y),(0,c.createScopedElement)("div",{vkuiClass:"PromoBanner__head"},(0,c.createScopedElement)(h.default,{weight:"regular",level:"1",vkuiClass:"PromoBanner__label"},g.advertisingLabel||"Advertisement"),null!=E&&(0,c.createScopedElement)(h.default,{weight:"regular",level:"1",vkuiClass:"PromoBanner__age"},E,"+"),!e.isCloseButtonHidden&&(0,c.createScopedElement)("div",{vkuiClass:"PromoBanner__close",onClick:e.onClose},(0,c.createScopedElement)(u.default,null))),(0,c.createScopedElement)(_.default,{href:g.trackingLink,onClick:A,rel:"nofollow noopener noreferrer",target:"_blank",before:(0,c.createScopedElement)(p.default,{mode:"image",size:48,src:g.iconLink,alt:g.title}),after:(0,c.createScopedElement)(d.default,{mode:"outline"},g.ctaText),description:g.domain},g.title),C.length>0&&(0,c.createScopedElement)("div",{vkuiClass:"PromoBanner__pixels"},(0,c.createScopedElement)("img",{src:C,alt:""})))}},160933:(e,t,n)=>{"use strict";n.d(t,{default:()=>O});var r=n(300975),o=n(243835),i=n(640137),a=n(101226),s=n(171178),c=n(351475),l=n(682754),u=n(939844),d=n(735567),_=n(667294),p=n(763029),h=n(196999),f=n(781959),m=n(93781),v=n(108681),g=n(780778),y=n(274301),E=n(212602),w=n(962557),b=n(181498),C=n(531318),S=n(18659),T=n(909795),A=["children","onRefresh","isFetching","platform","window","document","scroll"];function D(e){if(!e)return!1;for(;e.originalEvent;)e=e.originalEvent;return e.preventDefault&&e.cancelable&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}var P=function(e){(0,c.default)(n,e);var t=(0,l.default)(n);function n(e){var r;return(0,i.default)(this,n),r=t.call(this,e),(0,u.default)((0,s.default)(r),"params",void 0),(0,u.default)((0,s.default)(r),"contentRef",void 0),(0,u.default)((0,s.default)(r),"waitFetchingTimeout",void 0),(0,u.default)((0,s.default)(r),"onTouchStart",(function(e){r.state.refreshing&&D(e),r.setState({touchDown:!0})})),(0,u.default)((0,s.default)(r),"onWindowTouchMove",(function(e){r.state.refreshing&&(e.preventDefault(),e.stopPropagation())})),(0,u.default)((0,s.default)(r),"onTouchMove",(function(e){var t=e.isY,n=e.shiftY,o=r.params,i=o.start,a=o.max,s=r.props.scroll.getScroll().y,c=r.state,l=c.refreshing,u=c.watching,d=c.touchDown;if(u&&d){D(e);var _=r.params.positionMultiplier,p=Math.max(0,n-r.state.touchY),h=Math.max(i,Math.min(r.params.maxY,i+p*_)),f=h>-10?80*Math.abs((h+10)/a):0;r.setState({spinnerY:h,spinnerProgress:Math.min(80,Math.max(0,f)),canRefresh:f>80,contentShift:2.3*(h+10)}),f>85&&!l&&r.props.platform===v.IOS&&r.runRefreshing()}else t&&0===s&&n>0&&!l&&d&&(D(e),r.setState({watching:!0,touchY:n,spinnerY:i,spinnerProgress:0}))})),(0,u.default)((0,s.default)(r),"onTouchEnd",(function(){r.setState({watching:!1,touchDown:!1})})),(0,u.default)((0,s.default)(r),"onRefreshingFinish",(function(){r.state.touchDown||r.resetRefreshingState()})),r.params={start:e.platform===v.ANDROID||e.platform===v.VKCOM?-45:-10,max:e.platform===v.ANDROID||e.platform===v.VKCOM?80:50,maxY:e.platform===v.ANDROID||e.platform===v.VKCOM?80:400,refreshing:e.platform===v.ANDROID||e.platform===v.VKCOM?50:36,positionMultiplier:e.platform===v.ANDROID||e.platform===v.VKCOM?1:.21},r.state={watching:!1,refreshing:!1,canRefresh:!1,touchDown:!1,touchY:0,spinnerY:r.params.start,spinnerProgress:0,contentShift:0},r.contentRef=_.createRef(),r}return(0,a.default)(n,[{key:"document",get:function(){return this.props.document}},{key:"componentDidMount",value:function(){w.canUseDOM&&this.document.addEventListener("touchmove",this.onWindowTouchMove,{cancelable:!0,passive:!1})}},{key:"componentWillUnmount",value:function(){w.canUseDOM&&this.document.removeEventListener("touchmove",this.onWindowTouchMove,{cancelable:!0,passive:!1}),clearTimeout(this.waitFetchingTimeout)}},{key:"componentDidUpdate",value:function(e,t){if(e.isFetching&&!this.props.isFetching&&this.onRefreshingFinish(),!e.isFetching&&this.props.isFetching&&clearTimeout(this.waitFetchingTimeout),t.touchDown&&!this.state.touchDown){var n=this.state,r=n.refreshing,o=n.canRefresh;!r&&o?this.runRefreshing():r&&!this.props.isFetching?this.resetRefreshingState():this.setState({spinnerY:r?this.params.refreshing:this.params.start,spinnerProgress:0,contentShift:0})}}},{key:"runRefreshing",value:function(){!this.state.refreshing&&this.props.onRefresh&&(this.waitFetchingTimeout=setTimeout(this.onRefreshingFinish,1e3),this.setState({refreshing:!0,spinnerY:this.props.platform===v.ANDROID||this.props.platform===v.VKCOM?this.params.refreshing:this.state.spinnerY}),this.props.onRefresh(),(0,C.runTapticImpactOccurred)("light"))}},{key:"resetRefreshingState",value:function(){this.setState({watching:!1,canRefresh:!1,refreshing:!1,spinnerY:this.params.start,spinnerProgress:0,contentShift:0})}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.onRefresh,e.isFetching,e.platform),i=(e.window,e.document,e.scroll,(0,o.default)(e,A)),a=this.state,s=a.watching,c=a.refreshing,l=a.spinnerY,u=a.spinnerProgress,_=a.canRefresh,E=a.touchDown,w=a.contentShift,b="translate3d(0, ".concat(l,"px, 0)"),C="";return n===v.IOS&&c&&!E?C="translate3d(0, 100px, 0)":n===v.IOS&&(w||c)&&(C="translate3d(0, ".concat(w,"px, 0)")),(0,d.createScopedElement)(h.default.Provider,{value:!0},(0,d.createScopedElement)(p.Touch,(0,r.default)({},i,{onStart:this.onTouchStart,onMove:this.onTouchMove,onEnd:this.onTouchEnd,vkuiClass:(0,m.classNames)((0,g.getClassName)("PullToRefresh",n),{"PullToRefresh--watching":s,"PullToRefresh--refreshing":c})}),(0,d.createScopedElement)(f.default,{vkuiClass:"PullToRefresh__controls"},(0,d.createScopedElement)(y.default,{style:{transform:b,WebkitTransform:b,opacity:s||c||_?1:0},on:c,progress:c?null:u})),(0,d.createScopedElement)("div",{vkuiClass:"PullToRefresh__content",ref:this.contentRef,style:{transform:C,WebkitTransform:C}},t)))}}]),n}(_.PureComponent);const O=(0,S.withContext)((0,E.withPlatform)((0,b.withDOM)(P)),T.ScrollContext,"scroll")},274301:(e,t,n)=>{"use strict";n.d(t,{default:()=>l});var r=n(243835),o=n(735567),i=n(667294),a=n(93781),s=["on","progress","size","strokeWidth","style"];var c=function(e){var t=e.on,n=e.progress,i=e.size,c=e.strokeWidth,l=e.style,u=(0,r.default)(e,s),d=.5*i-.5*c,_=2*Math.PI*d,p=.5*i,h=function(e,t){var n=e/100;return 2*Math.PI*t*(1-n)}(t?80:n,d);return(0,o.createScopedElement)("div",{vkuiClass:(0,a.classNames)("PullToRefresh__spinner",{"PullToRefresh__spinner--on":t}),style:l,"aria-label":t?u["aria-label"]:void 0},(0,o.createScopedElement)("svg",{role:"presentation",vkuiClass:"PullToRefresh__spinner-self",style:{width:i,height:i},viewBox:"0 0 ".concat(i," ").concat(i),xmlns:"http://www.w3.org/2000/svg"},(0,o.createScopedElement)("g",{style:{width:i,height:i,transformOrigin:"".concat(p,"px ").concat(p,"px")}},(0,o.createScopedElement)("circle",{vkuiClass:"PullToRefresh__spinner-path",fill:"none",strokeDasharray:_,strokeDashoffset:h,strokeWidth:c,strokeLinecap:"round",cx:p,cy:p,r:d}))))};c.defaultProps={size:24,strokeWidth:2.5,on:!0,progress:null,"aria-label":"Пожалуйста, подождите..."};const l=i.memo(c)},176469:(e,t,n)=>{"use strict";n.d(t,{default:()=>g});var r=n(300975),o=n(243835),i=n(735567),a=n(795281),s=n(780778),c=n(93781),l=n(108681),u=n(119360),d=n(362276),_=n(672705),p=n(256631),h=n(243912),f=n(115446),m=n(455833),v=["children","description","style","className","getRef","getRootRef","sizeY"];const g=(0,_.withAdaptivity)((function(e){var t=e.children,n=e.description,_=e.style,g=e.className,y=e.getRef,E=e.getRootRef,w=e.sizeY,b=(0,o.default)(e,v),C=(0,u.usePlatform)(),S=C===l.VKCOM||w===d.SizeType.COMPACT?m.default:f.default;return(0,i.createScopedElement)(a.default,{Component:"label",style:_,className:g,vkuiClass:(0,c.classNames)((0,s.getClassName)("Radio",C),"Radio--sizeY-".concat(w)),activeEffectDelay:C===l.IOS?100:a.ACTIVE_EFFECT_DELAY,disabled:b.disabled,getRootRef:E},(0,i.createScopedElement)("input",(0,r.default)({},b,{type:"radio",vkuiClass:"Radio__input",ref:y})),(0,i.createScopedElement)("div",{vkuiClass:"Radio__container"},(0,i.createScopedElement)("i",{vkuiClass:"Radio__icon",role:"presentation"}),(0,i.createScopedElement)(S,{weight:"regular",vkuiClass:"Radio__content",Component:"div"},(0,i.createScopedElement)("div",{vkuiClass:"Radio__children"},t),(0,p.hasReactNode)(n)&&(0,i.createScopedElement)(h.default,{Component:"span",weight:"regular",vkuiClass:"Radio__description"},n))))}),{sizeY:!0})},158468:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(633656),l=n(108527),u=["onChange","defaultValue"],d=function(e){var t=e.onChange,n=e.defaultValue,d=(0,i.default)(e,u),_=Boolean(d.value),p=s.useState(n||[d.min,d.max]),h=(0,o.default)(p,2),f=h[0],m=h[1],v=d.value||f,g=(0,o.default)(v,2),y=g[0],E=g[1],w=[(0,c.clamp)(y,d.min,d.max),(0,c.clamp)(E,d.min,d.max)],b=s.useCallback((function(e,n){d.disabled||w[0]===e[0]&&w[1]===e[1]||(!_&&m(e),t&&t(e,n))}),[t,_,w]);return(0,a.createScopedElement)(l.UniversalSlider,(0,r.default)({},d,{value:w,onChange:b}))};d.defaultProps={min:0,max:100,step:0};const _=d},108527:(e,t,n)=>{"use strict";n.d(t,{UniversalSlider:()=>m});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(763029),l=n(780778),u=n(93781),d=n(633656),_=n(672705),p=n(428253),h=n(119360),f=["min","max","step","value","defaultValue","onChange","getRootRef","sizeY","disabled"],m=(0,_.withAdaptivity)((function(e){var t=e.min,n=e.max,_=e.step,m=e.value,v=(e.defaultValue,e.onChange),g=e.getRootRef,y=e.sizeY,E=e.disabled,w=(0,i.default)(e,f),b=(0,h.usePlatform)(),C=(0,o.default)(m,2),S=C[0],T=C[1],A=null!=S,D=s.useRef({dragging:!1,startX:0,containerWidth:0}).current,P=(0,p.useExternRef)(g),O=s.useRef(),I=s.useRef(),k=function(e){return(0,d.rescale)(e,[0,D.containerWidth],[t,n],{step:_})},R=function(e){if(null==S)return[null,e];var t=D.dragging;return"start"===t?e>T?(D.dragging="end",[T,e]):[e,T]:"end"===t?e<S?(D.dragging="start",[e,S]):[S,e]:m},M=function(e){return(e-t)/(n-t)*100},L=A?{width:"".concat(M(T)-M(S),"%"),left:"".concat(M(S),"%")}:{width:"".concat(M(T),"%")};return(0,a.createScopedElement)(c.Touch,(0,r.default)({"data-value":A?m.join(","):m},w,E?{}:{onStart:function(e){var t=P.current.getBoundingClientRect();D.containerWidth=t.width;var n=e.startX-t.left,r=k(n);D.dragging=function(e,t){return t===O.current?"start":t===I.current?"end":Math.abs(S-e)<=Math.abs(T-e)?"start":"end"}(r,e.originalEvent.target),D.startX=n,v(R(r),e),e.originalEvent.stopPropagation()},onMove:function(e){v(R(k(D.startX+(e.shiftX||0))),e),e.originalEvent.stopPropagation(),e.originalEvent.preventDefault()},onEnd:function(e){D.dragging=!1,e.originalEvent.stopPropagation()}},{vkuiClass:(0,u.classNames)((0,l.getClassName)("Slider",b),"Slider--sizeY-".concat(y),E&&"Slider--disabled")}),(0,a.createScopedElement)("div",{ref:P,vkuiClass:"Slider__in"},(0,a.createScopedElement)("div",{vkuiClass:"Slider__dragger",style:L},A&&(0,a.createScopedElement)("span",{vkuiClass:(0,u.classNames)("Slider__thumb","Slider__thumb--start"),ref:O}),(0,a.createScopedElement)("span",{vkuiClass:(0,u.classNames)("Slider__thumb","Slider__thumb--end"),ref:I}))))}),{sizeY:!0})},594735:(e,t,n)=>{"use strict";n.d(t,{Removable:()=>b});var r=n(300975),o=n(243835),i=n(46008),a=n(735567),s=n(667294),c=n(93781),l=n(256631),u=n(428253),d=n(119360),_=n(780778),p=n(324285),h=n(181498),f=n(108681),m=n(733024),v=n(600245),g=n(283821),y=n(795281),E=["getRootRef","children","onRemove","removePlaceholder","align"],w=function(e){var t=e.onRemoveClick,n=e.removePlaceholder,r=e.removePlaceholderString,o=e.children,c=(0,h.useDOM)().window,l=s.useRef(null),u=s.useState(0),d=(0,i.default)(u,2),_=d[0],p=d[1];(0,g.useGlobalEventListener)(c,"click",(function(){_>0&&p(0)}));return(0,a.createScopedElement)("div",{vkuiClass:"Removable__content",style:{transform:"translateX(-".concat(null!=_?_:0,"px)")},onTransitionEnd:function(){var e;_>0&&(null==l||null===(e=l.current)||void 0===e||e.focus())}},(0,a.createScopedElement)(v.default,{hasActive:!1,hasHover:!1,"aria-label":r,vkuiClass:"Removable__action Removable__toggle",onClick:function(e){e.stopPropagation();var t=(null==l?void 0:l.current).offsetWidth;p(void 0===t?0:t)},disabled:_>0},(0,a.createScopedElement)("i",{vkuiClass:"Removable__toggle-in",role:"presentation"})),o,(0,a.createScopedElement)("span",{vkuiClass:"Removable__offset","aria-hidden":"true"}),(0,a.createScopedElement)(y.default,{Component:"button",hasActive:!1,hasHover:!1,disabled:0===_,getRootRef:l,vkuiClass:"Removable__remove",onClick:t},(0,a.createScopedElement)("span",{vkuiClass:"Removable__remove-in"},n)))},b=function(e){var t=e.getRootRef,n=e.children,i=e.onRemove,s=void 0===i?l.noop:i,h=e.removePlaceholder,g=void 0===h?"Удалить":h,y=e.align,b=void 0===y?"center":y,C=(0,o.default)(e,E),S=(0,d.usePlatform)(),T=(0,p.useAdaptivity)().sizeY,A=(0,u.useExternRef)(t),D=function(e){e.preventDefault(),s(e)},P=(0,l.getTitleFromChildren)(g);return(0,a.createScopedElement)("div",(0,r.default)({},C,{ref:A,vkuiClass:(0,c.classNames)((0,_.getClassName)("Removable",S),"Removable--".concat(b),"Removable--sizeY-".concat(T))}),(S===f.ANDROID||S===f.VKCOM)&&(0,a.createScopedElement)("div",{vkuiClass:"Removable__content"},n,(0,a.createScopedElement)(v.default,{activeMode:"opacity",hoverMode:"opacity",vkuiClass:"Removable__action",onClick:D,"aria-label":P},(0,a.createScopedElement)(m.default,{role:"presentation"}))),S===f.IOS&&(0,a.createScopedElement)(w,{onRemoveClick:D,removePlaceholder:g,removePlaceholderString:P},n))}},54679:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var r=n(300975),o=n(243835),i=n(735567),a=n(93781),s=n(119360),c=n(780778),l=n(795281),u=n(256631),d=n(455833),_=n(243912),p=n(672705),h=["children","text","caption","before","after","bottom","actions","multiline","sizeY"];const f=(0,p.withAdaptivity)((function(e){var t=e.children,n=e.text,p=e.caption,f=e.before,m=e.after,v=e.bottom,g=e.actions,y=e.multiline,E=e.sizeY,w=(0,o.default)(e,h),b=(0,s.usePlatform)();return(0,i.createScopedElement)(l.default,(0,r.default)({},w,{vkuiClass:(0,a.classNames)((0,c.getClassName)("RichCell",b),{"RichCell--mult":y},"RichCell--sizeY-".concat(E))}),f,(0,i.createScopedElement)("div",{vkuiClass:"RichCell__in"},m,(0,i.createScopedElement)(d.default,{weight:"medium",vkuiClass:"RichCell__content"},(0,i.createScopedElement)("div",{vkuiClass:"RichCell__children"},t),(0,u.hasReactNode)(m)&&(0,i.createScopedElement)("div",{vkuiClass:"RichCell__after"},m)),(0,u.hasReactNode)(n)&&(0,i.createScopedElement)(d.default,{weight:"regular",vkuiClass:"RichCell__text"},n),(0,u.hasReactNode)(p)&&(0,i.createScopedElement)(_.default,{Component:"span",weight:"regular",vkuiClass:"RichCell__caption"},p),((0,u.hasReactNode)(v)||(0,u.hasReactNode)(g))&&(0,i.createScopedElement)("div",{vkuiClass:"RichCell__bottom"},v,(0,u.hasReactNode)(g)&&(0,i.createScopedElement)("div",{vkuiClass:"RichCell__actions"},g))))}),{sizeY:!0})},963504:(e,t,n)=>{"use strict";n.d(t,{default:()=>S});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(93781),l=n(780778),u=n(108681),d=n(766351),_=n(946674),p=n(645083),h=n(909795),f=n(119501),m=n(504153),v=n(644029),g=n(181498),y=n(214542),E=n(855356),w=n(119360),b=["popout","modal","children","activeView","onTransition","nav"],C=(0,v.warnOnce)("Root");const S=function(e){var t=e.popout,n=void 0===t?null:t,v=e.modal,S=e.children,T=e.activeView,A=e.onTransition,D=(e.nav,(0,i.default)(e,b)),P=s.useContext(h.ScrollContext),O=(0,w.usePlatform)(),I=(0,g.useDOM)().document,k=s.useRef({}).current,R=s.useRef({}).current,M=s.useContext(d.ConfigProviderContext).transitionMotionEnabled,L=void 0===M||M,x=s.useContext(_.SplitColContext).animate,N=!L||!x,B=s.Children.toArray(S),U=s.useState({activeView:T,transition:!1}),F=(0,o.default)(U,2),W=F[0],V=W.prevView,H=W.activeView,j=W.transition,K=W.isBack,z=F[1],G=function(){return z({activeView:H,prevView:V,isBack:K,transition:!1})};(0,y.useIsomorphicLayoutEffect)((function(){var e;null===(e=I.activeElement)||void 0===e||e.blur()}),[!!n,H]),(0,y.useIsomorphicLayoutEffect)((function(){return function(e){if(e!==H){var t=B.map((function(e){return(0,m.getNavId)(e.props,C)})),n=t.indexOf(e)<t.indexOf(H);k[H]=P.getScroll().y,z({activeView:e,prevView:H,transition:!0,isBack:n})}}(T)}),[T]),(0,y.useIsomorphicLayoutEffect)((function(){!j&&V&&(P.scrollTo(0,K?k[H]:0),A&&A({isBack:K,from:V,to:H}))}),[j]);var q=(0,E.useTimeout)(G,O===u.IOS?600:300);s.useEffect((function(){j?N?G():q.set():q.clear()}),[j]);var Y=function(e){["vkui-root-android-animation-hide-back","vkui-root-android-animation-show-forward","vkui-root-ios-animation-hide-back","vkui-root-ios-animation-show-forward"].includes(e.animationName)&&G()};return(0,a.createScopedElement)("div",(0,r.default)({},D,{vkuiClass:(0,c.classNames)((0,l.getClassName)("Root",O),{"Root--transition":!N&&j,"Root--no-motion":N})}),B.map((function(e){var t=(0,m.getNavId)(e.props,C);if(t!==H&&(!j||t!==V))return null;var n=j&&t===(K?V:H),r=j&&(t===V||K&&t===H);return(0,a.createScopedElement)("div",{key:t,ref:function(e){return R[t]=e},onAnimationEnd:n?Y:null,vkuiClass:(0,c.classNames)("Root__view",{"Root__view--hide-back":j&&t===V&&K,"Root__view--hide-forward":j&&t===V&&!K,"Root__view--show-back":j&&t===H&&K,"Root__view--show-forward":j&&t===H&&!K,"Root__view--active":!j&&t===H})},(0,a.createScopedElement)(f.NavTransitionProvider,{entering:j&&t===H},(0,a.createScopedElement)("div",{vkuiClass:"Root__scrollCompensation",style:{marginTop:r?-k[t]:null}},e)))})),(0,a.createScopedElement)(p.AppRootPortal,null,!!n&&(0,a.createScopedElement)("div",{vkuiClass:"Root__popout"},n),!!v&&(0,a.createScopedElement)("div",{vkuiClass:"Root__modal"},v)))}},106139:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(243835),i=n(735567),a=n(474353),s=n(949444),c=n(780778),l=n(119360),u=["style","className"],d=function(e){var t=e.style,n=e.className,d=(0,o.default)(e,u),_=(0,l.usePlatform)();return(0,i.createScopedElement)(s.PopoutWrapper,{hasMask:!1,vkuiClass:(0,c.getClassName)("ScreenSpinner",_),className:n,style:t},(0,i.createScopedElement)("div",{vkuiClass:"ScreenSpinner__container"},(0,i.createScopedElement)(a.default,(0,r.default)({vkuiClass:"ScreenSpinner__spinner"},d))))};d.defaultProps={size:"large","aria-label":"Пожалуйста, подождите..."};const _=d},616852:(e,t,n)=>{"use strict";n.d(t,{default:()=>S});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(93781),l=n(212602),u=n(780778),d=n(922995),_=n(733024),p=n(960837),h=n(108681),f=n(763029),m=n(256631),v=n(455833),g=n(931252),y=n(346921),E=n(428253),w=n(678988),b=["before","className","defaultValue","placeholder","after","getRef","platform","icon","onIconClick","style"],C=function(e){var t=e.before,n=e.className,l=e.defaultValue,p=e.placeholder,C=e.after,S=e.getRef,T=e.platform,A=e.icon,D=e.onIconClick,P=void 0===D?m.noop:D,O=e.style,I=(0,i.default)(e,b),k=(0,E.useExternRef)(S),R=s.useState(!1),M=(0,o.default)(R,2),L=M[0],x=M[1],N=(0,w.useEnsuredControl)(I,{defaultValue:l}),B=(0,o.default)(N,2),U=B[0],F=B[1],W=function(){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(k.current,"");var e=new Event("input",{bubbles:!0});k.current.dispatchEvent(e)},V=s.useCallback((function(e){return P(e.originalEvent)}),[P]),H=s.useCallback((function(e){e.originalEvent.preventDefault(),k.current.focus(),W()}),[W]);return(0,a.createScopedElement)("div",{vkuiClass:(0,c.classNames)((0,u.getClassName)("Search",T),{"Search--focused":L,"Search--has-value":!!U,"Search--has-after":!!C,"Search--has-icon":!!A}),className:n,style:O},(0,a.createScopedElement)("div",{vkuiClass:"Search__in"},(0,a.createScopedElement)("div",{vkuiClass:"Search__width"}),(0,a.createScopedElement)("label",{vkuiClass:"Search__control"},(0,a.createScopedElement)("input",(0,r.default)({type:"search"},I,{ref:k,vkuiClass:"Search__input",onFocus:function(e){x(!0),I.onFocus&&I.onFocus(e)},onBlur:function(e){x(!1),I.onBlur&&I.onBlur(e)},onChange:F,value:U})),T===h.IOS&&C&&(0,a.createScopedElement)("div",{vkuiClass:"Search__after-width"},C),(0,a.createScopedElement)("div",{vkuiClass:"Search__placeholder"},(0,a.createScopedElement)("div",{vkuiClass:"Search__placeholder-in"},t,T===h.VKCOM?(0,a.createScopedElement)(v.default,{vkuiClass:"Search__placeholder-text",weight:"regular"},p):(0,a.createScopedElement)(g.default,{vkuiClass:"Search__placeholder-text",level:"3",weight:"regular"},p)),L&&T===h.IOS&&C&&(0,a.createScopedElement)("div",{vkuiClass:"Search__after-width"},C))),(0,a.createScopedElement)("div",{vkuiClass:"Search__after",onClick:W},(0,a.createScopedElement)("div",{vkuiClass:"Search__icons"},A&&(0,a.createScopedElement)(f.Touch,{onStart:V,vkuiClass:"Search__icon"},A),!!U&&(0,a.createScopedElement)(f.Touch,{onStart:H,vkuiClass:"Search__icon"},T===h.IOS?(0,a.createScopedElement)(d.default,null):(0,a.createScopedElement)(_.default,null))),T===h.IOS&&C&&(0,a.createScopedElement)("div",{vkuiClass:"Search__after-in"},C))),T===h.VKCOM&&(0,a.createScopedElement)(y.default,{vkuiClass:"Search__separator",wide:!0}))};C.defaultProps={autoComplete:"off",defaultValue:"",placeholder:"Поиск",after:"Отмена",before:(0,a.createScopedElement)(p.default,null)};const S=(0,l.withPlatform)(C)},20362:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var r=n(243835),o=n(735567),i=n(451155),a=n(836931),s=n(672705),c=["hasMouse"],l=["children"],u=["options","popupDirection","renderOption"];const d=(0,s.withAdaptivity)((function(e){var t=e.hasMouse,n=(0,r.default)(e,c);if(t){n.children;var s=(0,r.default)(n,l);return(0,o.createScopedElement)(a.default,s)}var d=n.options,_=void 0===d?[]:d,p=(n.popupDirection,n.renderOption,(0,r.default)(n,u));return(0,o.createScopedElement)(i.default,p,_.map((function(e){var t=e.label,n=e.value;return(0,o.createScopedElement)("option",{value:n,key:"".concat(n)},t)})))}),{hasMouse:!0})},751467:(e,t,n)=>{"use strict";n.d(t,{default:()=>y});var r=n(300975),o=n(939844),i=n(243835),a=n(735567),s=n(93781),c=n(91742),l=n(937188),u=n(362276),d=n(672705),_=n(119360),p=n(780778),h=n(115446),f=n(455833),m=n(108681),v=["tabIndex","placeholder","children","align","getRootRef","multiline","disabled","onClick","sizeX","sizeY"],g=function(e){var t,n=e.tabIndex,d=e.placeholder,g=e.children,y=e.align,E=e.getRootRef,w=e.multiline,b=e.disabled,C=e.onClick,S=e.sizeX,T=e.sizeY,A=(0,i.default)(e,v),D=(0,_.usePlatform)(),P=D===m.VKCOM||T===u.SizeType.COMPACT?f.default:h.default;return(0,a.createScopedElement)(l.FormField,(0,r.default)({},A,{tabIndex:b?null:n,vkuiClass:(0,s.classNames)((0,p.getClassName)("Select",D),"Select--mimicry",(t={"Select--not-selected":!g,"Select--multiline":w},(0,o.default)(t,"Select--align-".concat(y),!!y),(0,o.default)(t,"Select--sizeX--".concat(S),!!S),(0,o.default)(t,"Select--sizeY--".concat(T),!!T),t)),getRootRef:E,onClick:b?null:C,disabled:b,after:(0,a.createScopedElement)(c.DropdownIcon,null)}),(0,a.createScopedElement)(P,{Component:"div",weight:"regular",vkuiClass:"Select__container"},(0,a.createScopedElement)("span",{vkuiClass:"Select__title"},g||d)))};g.defaultProps={tabIndex:0};const y=(0,d.withAdaptivity)(g,{sizeX:!0,sizeY:!0})},346921:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(93781),l=n(119360),u=["wide","expanded"],d=function(e){var t=e.wide,n=e.expanded,a=(0,o.default)(e,u),d=(0,l.usePlatform)();return(0,i.createScopedElement)("div",(0,r.default)({},a,{"aria-hidden":"true",vkuiClass:(0,c.classNames)((0,s.getClassName)("Separator",d),{"Separator--wide":t})}),(0,i.createScopedElement)("div",{vkuiClass:(0,c.classNames)("Separator__in",{"Separator__in--expanded":n})}))};const _=a.memo(d)},426305:(e,t,n)=>{"use strict";n.d(t,{default:()=>w});var r=n(243835),o=n(300975),i=n(735567),a=n(93781),s=n(780778),c=n(795281),l=n(783199),u=n(108681),d=n(119360),_=n(256631),p=n(324285),h=n(362276),f=n(672705),m=n(931252),v=n(455833),g=n(243912),y=["badge","before","indicator","children","after","description","expandable","multiline","sizeY"],E=function(e){return(0,p.useAdaptivity)().sizeY===h.SizeType.COMPACT?(0,i.createScopedElement)(v.default,(0,o.default)({Component:"span",weight:"regular"},e)):(0,i.createScopedElement)(m.default,(0,o.default)({Component:"span",level:"3",weight:"regular"},e))};const w=(0,f.withAdaptivity)((function(e){var t=e.badge,n=e.before,p=e.indicator,h=e.children,f=e.after,m=e.description,v=e.expandable,w=e.multiline,b=e.sizeY,C=(0,r.default)(e,y),S=(0,d.usePlatform)(),T=(0,_.hasReactNode)(f)||v&&S===u.IOS;return(0,i.createScopedElement)(c.default,(0,o.default)({},C,{vkuiClass:(0,a.classNames)((0,s.getClassName)("SimpleCell",S),{"SimpleCell--exp":v,"SimpleCell--mult":w},"SimpleCell--sizeY-".concat(b))}),n,(0,i.createScopedElement)("div",{vkuiClass:"SimpleCell__main"},(0,i.createScopedElement)("div",{vkuiClass:"SimpleCell__content"},(0,i.createScopedElement)(E,{vkuiClass:"SimpleCell__children"},h),(0,_.hasReactNode)(t)&&(0,i.createScopedElement)("span",{vkuiClass:"SimpleCell__badge"},t)),m&&(0,i.createScopedElement)(g.default,{Component:"span",weight:"regular",vkuiClass:"SimpleCell__description"},m)),(0,_.hasReactNode)(p)&&(0,i.createScopedElement)(E,{Component:"span",vkuiClass:"SimpleCell__indicator"},p),T&&(0,i.createScopedElement)("div",{vkuiClass:"SimpleCell__after"},f,v&&S===u.IOS&&(0,i.createScopedElement)(l.default,null)))}),{sizeY:!0})},509056:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(633656),l=n(108527),u=["onChange","defaultValue"],d=function(e){var t=e.onChange,n=e.defaultValue,d=(0,i.default)(e,u),_=null!=d.value,p=s.useState(null==n?d.min:n),h=(0,o.default)(p,2),f=h[0],m=h[1],v=(0,c.clamp)(_?d.value:f,d.min,d.max),g=s.useCallback((function(e,n){d.disabled||v===e[1]||(!_&&m(e[1]),t&&t(e[1],n))}),[t,_,v]),y=s.useMemo((function(){return[null,v]}),[v]);return(0,a.createScopedElement)(l.UniversalSlider,(0,r.default)({},d,{value:y,onChange:g}))};d.defaultProps={min:0,max:100,step:0};const _=d},750343:(e,t,n)=>{"use strict";n.d(t,{default:()=>v});var r=n(300975),o=n(46008),i=n(243835),a=n(640137),s=n(101226),c=n(171178),l=n(351475),u=n(682754),d=n(939844),_=n(735567),p=n(667294),h=n(914167),f=n(93781),m=["name","options","activeValue","onSwitch"],v=function(e){(0,l.default)(n,e);var t=(0,u.default)(n);function n(e){var r,o;return(0,a.default)(this,n),o=t.call(this,e),(0,d.default)((0,c.default)(o),"firstButton",void 0),(0,d.default)((0,c.default)(o),"secondButton",void 0),(0,d.default)((0,c.default)(o),"onSwitch",(function(e){var t=o.props.onSwitch;o.setState((function(){return{activeValue:e}}),(function(){t&&t(e)}))})),(0,d.default)((0,c.default)(o),"handleFirstClick",(function(){var e=o.props.options[0].value;o.onSwitch(e)})),(0,d.default)((0,c.default)(o),"handleSecondClick",(function(){var e=o.props.options[1].value;o.onSwitch(e)})),(0,d.default)((0,c.default)(o),"handleFirstHover",(function(){o.setState((function(){return{hoveredOptionId:0}}))})),(0,d.default)((0,c.default)(o),"handleSecondHover",(function(){o.setState((function(){return{hoveredOptionId:1}}))})),(0,d.default)((0,c.default)(o),"resetFocusedOption",(function(){o.setState((function(){return{hoveredOptionId:-1}}))})),(0,d.default)((0,c.default)(o),"switchByKey",(function(e){if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){e.preventDefault();var t=o.props.options,n=o.state.activeValue,r=t.find((function(e){return e.value!==n})).value;o.onSwitch(r),t[0].value===r?o.firstButton.current.focus():o.secondButton.current.focus()}})),o.state={activeValue:null!==(r=e.activeValue)&&void 0!==r?r:"",hoveredOptionId:-1},o.firstButton=p.createRef(),o.secondButton=p.createRef(),o}return(0,s.default)(n,[{key:"render",value:function(){var e,t=this.props,n=t.name,a=t.options,s=(t.activeValue,t.onSwitch,(0,i.default)(t,m)),c=this.state,l=c.activeValue,u=c.hoveredOptionId,p=(0,o.default)(a,2),v=p[0],g=p[1],y=v.value===l,E=g.value===l;return(0,_.createScopedElement)("div",(0,r.default)({},s,{vkuiClass:"SliderSwitch",onKeyDown:this.switchByKey,onMouseLeave:this.resetFocusedOption}),!y&&!E&&(0,_.createScopedElement)("div",{vkuiClass:"SliderSwitch__border"}),(0,_.createScopedElement)("div",{vkuiClass:(0,f.classNames)("SliderSwitch__slider",(e={},(0,d.default)(e,"SliderSwitch--firstActive",y),(0,d.default)(e,"SliderSwitch--secondActive",E),e))}),(0,_.createScopedElement)("input",{type:"hidden",name:n,value:l}),(0,_.createScopedElement)(h.default,{active:y,hovered:0===u,"aria-pressed":y,onClick:this.handleFirstClick,onMouseEnter:this.handleFirstHover,getRootRef:this.firstButton},v.name),(0,_.createScopedElement)(h.default,{active:E,hovered:1===u,onClick:this.handleSecondClick,onMouseEnter:this.handleSecondHover,getRootRef:this.secondButton},g.name))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.activeValue&&e.activeValue!==t.activeValue?{activeValue:e.activeValue}:null}}]),n}(p.Component);(0,d.default)(v,"defaultProps",{options:[{name:"",value:""},{name:"",value:""}]})},914167:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var r=n(300975),o=n(939844),i=n(46008),a=n(243835),s=n(735567),c=n(667294),l=n(795281),u=n(780778),d=n(93781),_=n(119360),p=n(455833),h=["active","hovered","children","getRootRef"];const f=function(e){var t,n=e.active,f=e.hovered,m=e.children,v=e.getRootRef,g=(0,a.default)(e,h),y=(0,_.usePlatform)(),E=c.useState(!1),w=(0,i.default)(E,2),b=w[0],C=w[1],S=function(){C(!b)};return(0,s.createScopedElement)(l.default,(0,r.default)({},g,{vkuiClass:(0,d.classNames)((0,u.getClassName)("SliderSwitch__button",y),(t={},(0,o.default)(t,"SliderSwitch__button--active",n),(0,o.default)(t,"SliderSwitch__button--hover",!n&&f),(0,o.default)(t,"SliderSwitch__button--activeHover",n&&f),(0,o.default)(t,"SliderSwitch__button--focus",b&&!f),t)),Component:"button",type:"button",getRootRef:v,"aria-pressed":n,onFocus:S,onBlur:S,tabIndex:0,hasActive:!1,hoverMode:"opacity"}),(0,s.createScopedElement)(p.default,{weight:"medium"},m))}},836392:(e,t,n)=>{"use strict";n.d(t,{Snackbar:()=>C});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(763029),l=n(93781),u=n(780778),d=n(108681),_=n(970414),p=n(362276),h=n(672705),f=n(455833),m=n(658113),v=n(645083),g=n(70743),y=n(119360),E=n(855356),w=["children","layout","action","before","after","viewWidth","duration","onActionClick","onClose"],b=function(e){var t=e.children,n=e.layout,h=e.action,b=e.before,C=e.after,S=e.viewWidth,T=e.duration,A=e.onActionClick,D=e.onClose,P=(0,i.default)(e,w),O=(0,y.usePlatform)(),I=(0,g.useWaitTransitionFinish)().waitTransitionFinish,k=s.useState(!1),R=(0,o.default)(k,2),M=R[0],L=R[1],x=s.useState(!1),N=(0,o.default)(x,2),B=N[0],U=N[1],F=s.useRef(0),W=s.useRef(0),V=s.useRef(null),H=s.useRef(null),j=s.useRef(null),K=S>=p.ViewWidth.SMALL_TABLET,z=O===d.ANDROID||O===d.VKCOM?400:320,G=function(){L(!0),I(H.current,(function(){D()}),z)},q=(0,E.useTimeout)(G,T),Y=function(e){cancelAnimationFrame(j.current),j.current=requestAnimationFrame((function(){V.current&&(V.current.style.transform="translate3d(".concat(e,"%, 0, 0)"))}))},$=q.clear;s.useEffect(q.set,[]);var X=C||K?"vertical":n;return(0,a.createScopedElement)(v.AppRootPortal,null,(0,a.createScopedElement)("div",(0,r.default)({},P,{vkuiClass:(0,l.classNames)((0,u.getClassName)("Snackbar",O),"Snackbar--l-".concat(X),{"Snackbar--closing":M,"Snackbar--touched":B,"Snackbar--desktop":K})}),(0,a.createScopedElement)(c.Touch,{vkuiClass:"Snackbar__in",getRootRef:H,onStart:$,onMoveX:function(e){var t=e.shiftX;e.originalEvent.preventDefault(),B||U(!0),F.current=t/V.current.offsetWidth*100,W.current=(0,_.rubber)(F.current,72,1.2,O===d.ANDROID||O===d.VKCOM),Y(W.current)},onEnd:function(e){var t;if(B){var n=W.current;n+=n/e.duration*240*.6,K&&n<=-50?(q.clear(),I(V.current,(function(){D()}),z),Y(-120)):!K&&n>=50?(q.clear(),I(V.current,(function(){D()}),z),Y(120)):t=function(){q.set(),Y(0)}}else q.set();U(!1),t&&requestAnimationFrame(t)}},(0,a.createScopedElement)("div",{vkuiClass:"Snackbar__body",ref:V},b&&(0,a.createScopedElement)("div",{vkuiClass:"Snackbar__before"},b),(0,a.createScopedElement)("div",{vkuiClass:"Snackbar__content"},(0,a.createScopedElement)(f.default,{weight:"regular",vkuiClass:"Snackbar__content-text"},t),h&&(0,a.createScopedElement)(m.default,{align:"left",hasHover:!1,mode:"tertiary",size:"s",vkuiClass:"Snackbar__action",onClick:function(e){G(),h&&"function"==typeof A&&A(e)}},h)),C&&(0,a.createScopedElement)("div",{vkuiClass:"Snackbar__after"},C)))))};b.displayName="Snackbar",b.defaultProps={duration:4e3,layout:"horizontal"};var C=(0,h.withAdaptivity)(b,{viewWidth:!0})},257451:(e,t,n)=>{"use strict";n.d(t,{Spacing:()=>d});var r=n(300975),o=n(309919),i=n(243835),a=n(735567),s=n(93781),c=n(119360),l=n(780778),u=["size","separator","style"],d=function(e){var t=e.size,n=e.separator,d=e.style,_=(0,i.default)(e,u),p=(0,c.usePlatform)(),h=(0,o.default)({height:t},d);return(0,a.createScopedElement)("div",(0,r.default)({},_,{"aria-hidden":"true",vkuiClass:(0,s.classNames)((0,l.getClassName)("Spacing",p),{"Spacing--separator":!!n,"Spacing--separator-center":!0===n||"center"===n,"Spacing--separator-top":"top"===n,"Spacing--separator-bottom":"bottom"===n}),style:h}))};d.defaultProps={size:8}},474353:(e,t,n)=>{"use strict";n.d(t,{default:()=>f});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(956772),l=n(36890),u=n(916237),d=n(5420),_=n(119360),p=["size"],h=function(e){var t=e.size,n=(0,o.default)(e,p),a=(0,_.usePlatform)(),h=c.default;return"large"===t&&(h=l.default),"medium"===t&&(h=u.default),"small"===t&&(h=d.default),(0,i.createScopedElement)("span",(0,r.default)({role:"status"},n,{vkuiClass:(0,s.getClassName)("Spinner",a)}),(0,i.createScopedElement)(h,{"aria-hidden":"true",vkuiClass:"Spinner__self"}))};h.defaultProps={size:"regular","aria-label":"Загружается..."};const f=a.memo(h)},946674:(e,t,n)=>{"use strict";n.d(t,{SplitColContext:()=>u,SplitCol:()=>d});var r=n(300975),o=n(309919),i=n(243835),a=n(735567),s=n(667294),c=n(93781),l=["children","width","maxWidth","minWidth","spaced","animate","fixed","style"],u=s.createContext({colRef:null,animate:!0}),d=function(e){var t=e.children,n=e.width,d=e.maxWidth,_=e.minWidth,p=e.spaced,h=e.animate,f=void 0!==h&&h,m=e.fixed,v=e.style,g=(0,i.default)(e,l),y=s.useRef(),E=s.useMemo((function(){return{colRef:y,animate:f}}),[y,f]);return(0,a.createScopedElement)("div",(0,r.default)({},g,{style:(0,o.default)((0,o.default)({},v),{},{width:n,maxWidth:d,minWidth:_}),ref:y,vkuiClass:(0,c.classNames)("SplitCol",{"SplitCol--spaced":p,"SplitCol--fixed":m})}),(0,a.createScopedElement)(u.Provider,{value:E},m?(0,a.createScopedElement)("div",{vkuiClass:"SplitCol__fixedInner"},t):t))}},243143:(e,t,n)=>{"use strict";n.d(t,{SplitLayout:()=>d});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(93781),c=n(311323),l=n(119360),u=["popout","modal","header","children","getRootRef","getRef"],d=function(e){var t=e.popout,n=e.modal,d=e.header,_=e.children,p=e.getRootRef,h=e.getRef,f=(0,o.default)(e,u),m=(0,l.usePlatform)();return(0,i.createScopedElement)(c.PopoutRoot,{vkuiClass:(0,a.getClassName)("SplitLayout",m),popout:t,modal:n,getRootRef:p},d,(0,i.createScopedElement)("div",(0,r.default)({},f,{ref:h,vkuiClass:(0,s.classNames)("SplitLayout__inner",{"SplitLayout__inner--header":!!d})}),_))}},800415:(e,t,n)=>{"use strict";n.d(t,{SubnavigationBar:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(119360),s=n(93781),c=n(780778),l=n(635717),u=["mode","children","showArrows","getScrollToLeft","getScrollToRight","scrollAnimationDuration"],d=function(e){return e-240},_=function(e){return e+240},p=function(e){var t,n=e.mode,p=void 0===n?"overflow":n,h=e.children,f=e.showArrows,m=void 0===f||f,v=e.getScrollToLeft,g=void 0===v?d:v,y=e.getScrollToRight,E=void 0===y?_:y,w=e.scrollAnimationDuration,b=(0,o.default)(e,u),C=(0,a.usePlatform)(),S={};return"fixed"===p?t="div":(t=l.default,S={showArrows:m,getScrollToLeft:g,getScrollToRight:E,scrollAnimationDuration:w}),(0,i.createScopedElement)("div",(0,r.default)({},b,{vkuiClass:(0,s.classNames)((0,c.getClassName)("SubnavigationBar",C),"SubnavigationBar--".concat(p))}),(0,i.createScopedElement)(t,(0,r.default)({vkuiClass:"SubnavigationBar__in"},S),(0,i.createScopedElement)("div",{vkuiClass:"SubnavigationBar__scrollIn"},h)))}},197741:(e,t,n)=>{"use strict";n.d(t,{SubnavigationButton:()=>v});var r=n(300975),o=n(243835),i=n(735567),a=n(93781),s=n(780778),c=n(256631),l=n(795281),u=n(164357),d=n(119360),_=n(443910),p=n(243912),h=["textLevel"],f=["size","selected","textLevel","before","after","expandable","children"],m=function(e){var t=e.textLevel,n=(0,o.default)(e,h);return 1===t?(0,i.createScopedElement)(p.default,(0,r.default)({weight:"regular"},n)):(0,i.createScopedElement)(_.default,(0,r.default)({level:2===t?"1":"2",weight:"regular"},n))},v=function(e){var t=(0,d.usePlatform)(),n=e.size,_=e.selected,p=e.textLevel,h=e.before,v=e.after,g=e.expandable,y=e.children,E=(0,o.default)(e,f);return(0,i.createScopedElement)(l.default,(0,r.default)({},E,{hasActive:!1,focusVisibleMode:"outside",vkuiClass:(0,a.classNames)((0,s.getClassName)("SubnavigationButton",t),"SubnavigationButton--".concat(n),{"SubnavigationButton--selected":_}),"aria-label":(0,c.getTitleFromChildren)(y)}),(0,i.createScopedElement)("span",{vkuiClass:"SubnavigationButton__in"},(0,c.hasReactNode)(h)&&(0,i.createScopedElement)("span",{vkuiClass:"SubnavigationButton__before"},h),(0,i.createScopedElement)(m,{textLevel:p,vkuiClass:"SubnavigationButton__label",Component:"span"},y),(0,c.hasReactNode)(v)&&(0,i.createScopedElement)("span",{vkuiClass:"SubnavigationButton__after"},v),g&&(0,i.createScopedElement)(u.default,{vkuiClass:"SubnavigationButton__expandableIcon"})))};v.defaultProps={size:"m",textLevel:1}},763781:(e,t,n)=>{"use strict";n.d(t,{Switch:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(93781),c=n(119360),l=n(324285),u=n(428253),d=n(266917),_=["style","className","getRef","getRootRef"],p=function(e){var t=e.style,n=e.className,p=e.getRef,h=e.getRootRef,f=(0,o.default)(e,_),m=(0,c.usePlatform)(),v=(0,l.useAdaptivity)().sizeY,g=(0,u.useExternRef)(p);return(0,i.createScopedElement)("label",{vkuiClass:(0,s.classNames)((0,a.getClassName)("Switch",m),"Switch--sizeY-".concat(v)),className:n,style:t,ref:h,role:"presentation"},(0,i.createScopedElement)("input",(0,r.default)({},f,{type:"checkbox",vkuiClass:"Switch__self",ref:g})),(0,i.createScopedElement)("span",{role:"presentation",vkuiClass:"Switch__pseudo"}),(0,i.createScopedElement)(d.FocusVisible,{mode:"outside"}))}},780991:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(93781),l=n(119360),u=["children","shadow","itemsLayout"],d=function(e){var t=e.children,n=e.shadow,d=e.itemsLayout,_=(0,o.default)(e,u),p=(0,l.usePlatform)();return(0,i.createScopedElement)("div",(0,r.default)({vkuiClass:(0,c.classNames)((0,s.getClassName)("Tabbar",p),"Tabbar--l-".concat(function(){switch(d){case"horizontal":case"vertical":return d;default:return a.Children.count(t)>2?"vertical":"horizontal"}}()),{"Tabbar--shadow":n})},_),(0,i.createScopedElement)("div",{vkuiClass:"Tabbar__in"},t))};d.defaultProps={shadow:!0};const _=d},146881:(e,t,n)=>{"use strict";n.d(t,{default:()=>h});var r=n(300975),o=n(243835),i=n(735567),a=n(780778),s=n(643831),c=n(93781),l=n(119360),u=n(256631),d=n(795281),_=n(108681),p=["children","selected","label","indicator","text","href","Component","disabled"];const h=function(e){var t=e.children,n=e.selected,h=e.label,f=e.indicator,m=e.text,v=e.href,g=e.Component,y=void 0===g?v?"a":"button":g,E=e.disabled,w=(0,o.default)(e,p),b=(0,l.usePlatform)();return(0,i.createScopedElement)(y,(0,r.default)({},w,{disabled:E,href:v,vkuiClass:(0,c.classNames)((0,a.getClassName)("TabbarItem",b),{"TabbarItem--selected":n,"TabbarItem--text":!!m})}),(0,i.createScopedElement)(d.default,{role:"presentation",Component:"div",disabled:E,activeMode:b===_.Platform.IOS?"TabbarItem__tappable--active":"background",activeEffectDelay:b===_.Platform.IOS?0:300,hasHover:!1,vkuiClass:"TabbarItem__tappable"}),(0,i.createScopedElement)("div",{vkuiClass:"TabbarItem__in"},(0,i.createScopedElement)("div",{vkuiClass:"TabbarItem__icon"},t,(0,i.createScopedElement)("div",{vkuiClass:"TabbarItem__label"},(0,u.hasReactNode)(f)&&f,!f&&h&&(0,i.createScopedElement)(s.default,{size:"s",mode:"prominent"},h))),m&&(0,i.createScopedElement)("div",{vkuiClass:"TabbarItem__text"},m)))}},65309:(e,t,n)=>{"use strict";n.d(t,{TabsModeContext:()=>p,default:()=>f});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(93781),l=n(119360),u=n(108681),d=n(672705),_=["children","mode","getRootRef","sizeX"],p=a.createContext("default"),h=function(e){var t=e.children,n=e.mode,a=e.getRootRef,d=e.sizeX,h=(0,o.default)(e,_),f=(0,l.usePlatform)();return f!==u.IOS&&"segmented"===n&&(n="default"),(0,i.createScopedElement)("div",(0,r.default)({},h,{ref:a,vkuiClass:(0,c.classNames)((0,s.getClassName)("Tabs",f),"Tabs--".concat(n),"Tabs--sizeX-".concat(d))}),(0,i.createScopedElement)("div",{vkuiClass:"Tabs__in"},(0,i.createScopedElement)(p.Provider,{value:n},t)))};h.defaultProps={mode:"default"};const f=(0,d.withAdaptivity)(h,{sizeX:!0})},461181:(e,t,n)=>{"use strict";n.d(t,{default:()=>y});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(795281),l=n(93781),u=n(108681),d=n(119360),_=n(256631),p=n(65309),h=n(115446),f=n(243912),m=n(455833),v=["children","selected","after"],g=function(e){var t=e.children,n=e.selected,g=e.after,y=(0,o.default)(e,v),E=(0,d.usePlatform)(),w=a.useContext(p.TabsModeContext),b="buttons"===w||"segmented"===w?f.default:h.default;return E===u.VKCOM&&(b=m.default),(0,i.createScopedElement)(c.default,(0,r.default)({},y,{vkuiClass:(0,l.classNames)((0,s.getClassName)("TabsItem",E),{"TabsItem--selected":n}),hasActive:"segmented"===w,activeMode:"TabsItem--active",focusVisibleMode:"segmented"===w?"outside":"inside"}),(0,i.createScopedElement)(b,{Component:"span",vkuiClass:"TabsItem__in",weight:"medium"},t),(0,_.hasReactNode)(g)&&(0,i.createScopedElement)("div",{vkuiClass:"TabsItem__after"},g))};g.defaultProps={selected:!1};const y=g},795281:(e,t,n)=>{"use strict";n.d(t,{ACTIVE_EFFECT_DELAY:()=>D,default:()=>L});var r=n(300975),o=n(939844),i=n(239626),a=n(243835),s=n(46008),c=n(735567),l=n(667294),u=n(46210),d=n(962557),_=n(763029),p=n(196999),h=n(93781),f=n(780778),m=n(108681),v=n(640784),g=n(970414),y=n(672705),E=n(304830),w=n(214542),b=n(266917),C=n(855356),S=n(428253),T=n(119360),A=["children","Component","onClick","onKeyDown","activeEffectDelay","stopPropagation","getRootRef","sizeX","hasMouse","deviceHasHover","hasHover","hoverMode","hasActive","activeMode","focusVisibleMode"],D=600,P=(0,u.default)(),O=0,I=1,k=2,R=3,M=l.createContext({onHoverChange:d.noop});const L=(0,y.withAdaptivity)((function(e){var t,n=e.children,u=e.Component,y=e.onClick,L=e.onKeyDown,N=e.activeEffectDelay,B=void 0===N?D:N,U=e.stopPropagation,F=void 0!==U&&U,W=e.getRootRef,V=e.sizeX,H=e.hasMouse,j=e.deviceHasHover,K=e.hasHover,z=void 0===K||K,G=e.hoverMode,q=void 0===G?"background":G,Y=e.hasActive,$=void 0===Y||Y,X=e.activeMode,Q=void 0===X?"background":X,J=e.focusVisibleMode,Z=void 0===J?"inside":J,ee=(0,a.default)(e,A);u=u||(ee.href?"a":"div");var te=l.useContext(M).onHoverChange,ne=l.useContext(p.default),re=(0,T.usePlatform)(),oe=l.useState([]),ie=(0,s.default)(oe,2),ae=ie[0],se=ie[1],ce=l.useState(!1),le=(0,s.default)(ce,2),ue=le[0],de=le[1],_e=l.useState(!1),pe=(0,s.default)(_e,2),he=pe[0],fe=pe[1],me=he&&!ee.disabled,ve=$&&!ue&&!ee.disabled,ge=j&&z&&!ue,ye="a"!==u&&"button"!==u&&!ee.contentEditable,Ee=["opacity","background"].includes(q),we=["opacity","background"].includes(Q),be=function(e,t){var n=l.useMemo((function(){return Math.round(1e8*Math.random()).toString(16)}),[]),r=l.useState(O),o=(0,s.default)(r,2),i=o[0],a=o[1],c=function(){return a(O)},u=function(){return e&&a(k)},_=(0,C.useTimeout)(u,70),p=(0,C.useTimeout)(c,t);return(0,w.useIsomorphicLayoutEffect)((function(){return i===I?(_.set(),_.clear):i===R?p.clear:(i===k&&P.emit("active",n),d.noop)}),[i]),(0,w.useIsomorphicLayoutEffect)((function(){if(i===O)return d.noop;var e=function(e){e!==n&&c()};return P.on("active",e),function(){return P.off("active",e)}}),[i===O]),(0,w.useIsomorphicLayoutEffect)((function(){!e&&c()}),[e]),[i,{delayStart:function(){e&&a(I)},start:u,stop:function(e){if(e)return a(R),p.set(e);c()}}]}(ve,B),Ce=(0,s.default)(be,2),Se=Ce[0],Te=Ce[1],Ae=Te.start,De=Te.stop,Pe=Te.delayStart,Oe=Se===k||Se===R,Ie=(0,S.useExternRef)(W),ke=l.useRef({onHoverChange:de}).current;(0,w.useIsomorphicLayoutEffect)((function(){return me?(te(!0),function(){return te(!1)}):d.noop}),[me]);var Re=(0,h.classNames)((0,f.getClassName)("Tappable",re),"Tappable--sizeX-".concat(V),(t={"Tappable--active":ve&&Oe,"Tappable--mouse":H},(0,o.default)(t,"Tappable--hover-".concat(q),ge&&me&&Ee),(0,o.default)(t,"Tappable--active-".concat(Q),ve&&Oe&&we),(0,o.default)(t,q,ge&&me&&!Ee),(0,o.default)(t,Q,ve&&Oe&&!we),t)),Me={onStart:function(e){var t=e.originalEvent;if(ve){if(t.touches&&t.touches.length>1)return De();if(re===m.ANDROID){var n=(0,v.getOffsetRect)(Ie.current),r=n.top,o=n.left,a=(0,g.coordX)(t)-o,s=(0,g.coordY)(t)-r;se([].concat((0,i.default)(ae),[{x:a,y:s,id:Date.now().toString()}]))}Pe()}},onMove:function(e){e.isSlide&&De()},onEnd:function(e){var t=e.duration;if(Se!==O){Se===I&&Ae();var n=t-70;De(n>=100?0:B-n)}},onClick:y,onKeyDown:function(e){if(ye&&(0,E.shouldTriggerClickOnEnterOrSpace)(e)&&(e.preventDefault(),Ie.current.click()),"function"==typeof L)return L(e)}},Le=ee.href?"link":"button";return(0,c.createScopedElement)(_.Touch,(0,r.default)({onEnter:function(){return fe(!0)},onLeave:function(){return fe(!1)},type:"button"===u?"button":void 0,tabIndex:ye&&!ee.disabled?0:void 0,role:ye?Le:void 0,"aria-disabled":ye?ee.disabled:null,stopPropagation:F&&!ne&&!ee.disabled},ee,{slideThreshold:20,usePointerHover:!0,vkuiClass:Re,Component:u,getRootRef:Ie},ee.disabled?{}:Me),(0,c.createScopedElement)(M.Provider,{value:ke},n),re===m.ANDROID&&!H&&ve&&"background"===Q&&(0,c.createScopedElement)("span",{"aria-hidden":"true",vkuiClass:"Tappable__waves"},ae.map((function(e){return(0,c.createScopedElement)(x,(0,r.default)({},e,{key:e.id,onClear:function(){return se(ae.filter((function(t){return t.id!==e.id})))}}))}))),ge&&"background"===q&&(0,c.createScopedElement)("span",{"aria-hidden":"true",vkuiClass:"Tappable__hoverShadow"}),!ee.disabled&&(0,c.createScopedElement)(b.FocusVisible,{mode:Z}))}),{sizeX:!0,hasMouse:!0,deviceHasHover:!0});function x(e){var t=e.x,n=e.y,r=e.onClear,o=(0,C.useTimeout)(r,225);return l.useEffect((function(){return o.set()}),[]),(0,c.createScopedElement)("span",{vkuiClass:"Tappable__wave",style:{top:n,left:t}})}},371411:(e,t,n)=>{"use strict";n.d(t,{default:()=>v});var r=n(300975),o=n(46008),i=n(243835),a=n(735567),s=n(667294),c=n(93781),l=n(937188),u=n(672705),d=n(780778),_=n(678988),p=n(428253),h=n(119360),f=["defaultValue","grow","style","onResize","className","getRootRef","getRef","sizeY","rows"],m=s.memo((function(e){var t=e.defaultValue,n=void 0===t?"":t,u=e.grow,m=void 0===u||u,v=e.style,g=e.onResize,y=e.className,E=e.getRootRef,w=e.getRef,b=e.sizeY,C=e.rows,S=void 0===C?2:C,T=(0,i.default)(e,f),A=(0,_.useEnsuredControl)(T,{defaultValue:n}),D=(0,o.default)(A,2),P=D[0],O=D[1],I=s.useRef(),k=(0,p.useExternRef)(w),R=(0,h.usePlatform)();return s.useEffect((function(){var e=k.current;m&&e.offsetParent&&(e.style.height=null,e.style.height="".concat(e.scrollHeight,"px"),e.scrollHeight!==I.current&&g&&(g(e),I.current=e.scrollHeight))}),[m,P,b]),(0,a.createScopedElement)(l.FormField,{vkuiClass:(0,c.classNames)((0,d.getClassName)("Textarea",R),"Textarea--sizeY-".concat(b)),className:y,style:v,getRootRef:E,disabled:T.disabled},(0,a.createScopedElement)("textarea",(0,r.default)({},T,{rows:S,vkuiClass:"Textarea__el",value:P,onChange:O,ref:k})))}));const v=(0,u.withAdaptivity)(m,{sizeY:!0})},67648:(e,t,n)=>{"use strict";n.d(t,{default:()=>A});var r=n(939844),o=(n(38429),n(46008)),i=n(243835),a=n(300975),s=n(735567),c=n(667294),l=n(973935),u=n(93781),d=n(780778),_=n(243912),p=n(119501),h=n(140867),f=n(566506),m=n(428253),v=n(181498),g=n(644029),y=(n(256631),n(283821)),E=["children","isShown","offsetX","offsetY","alignX","alignY","onClose","cornerOffset","cornerAbsoluteOffset"],w=function(e){return c.isValidElement(e)&&"string"==typeof e.type},b=(0,d.getClassName)("Tooltip"),C=((0,g.warnOnce)("Tooltip"),c.forwardRef((function(e,t){var n=e.mode,r=void 0===n?"accent":n,o=e.header,i=e.text,c=e.arrowRef,l=e.style,d=void 0===l?{}:l,p=e.attributes;return(0,s.createScopedElement)("div",{vkuiClass:(0,u.classNames)(b,"Tooltip--".concat(r))},(0,s.createScopedElement)("div",(0,a.default)({vkuiClass:"Tooltip__container",ref:t,style:d.container},p.container),(0,s.createScopedElement)("div",(0,a.default)({vkuiClass:"Tooltip__corner",style:d.arrow},p.arrow,{ref:c})),(0,s.createScopedElement)("div",{vkuiClass:"Tooltip__content"},o&&(0,s.createScopedElement)(_.default,{weight:"semibold",vkuiClass:"Tooltip__title"},o),i&&(0,s.createScopedElement)(_.default,{weight:"regular",vkuiClass:"Tooltip__text"},i))))})));function S(e){switch(e){case"left":return"start";case"right":return"end";default:return""}}var T=function(e){var t=e.children,n=e.isShown,u=e.offsetX,d=void 0===u?0:u,_=e.offsetY,g=void 0===_?15:_,b=e.alignX,T=e.alignY,A=e.onClose,D=e.cornerOffset,P=e.cornerAbsoluteOffset,O=(0,i.default)(e,E),I=(0,p.useNavTransition)().entering,k=n&&!I,R=c.useState(),M=(0,o.default)(R,2),L=M[0],x=M[1],N=c.useState(),B=(0,o.default)(N,2),U=B[0],F=B[1],W=c.useState(),V=(0,o.default)(W,2),H=V[0],j=V[1],K=c.useMemo((function(){return null==H?void 0:H.closest("[".concat(f.tooltipContainerAttr,"]"))}),[H]),z=c.useMemo((function(){return"fixed"===(null==H?void 0:H.style.position)?"fixed":"absolute"}),[H]);var G=c.useMemo((function(){return{name:"arrowOffset",enabled:!0,phase:"main",fn:function(e){var t=e.state;!function(e){return e.startsWith("top")||e.startsWith("bottom")}(t.placement)?void 0!==P?t.modifiersData.arrow.y=P:t.modifiersData.arrow.y+=D:void 0!==P?t.modifiersData.arrow.x=P:t.modifiersData.arrow.x+=D}}}),[D,P]),q=function(e,t){return[t||"bottom",S(e||"left")].filter((function(e){return!!e})).join("-")}(b,T),Y=(0,h.usePopper)(H,L,{strategy:z,placement:q,modifiers:[{name:"offset",options:{offset:[d,g]}},{name:"arrow",options:{element:U,padding:14}},{name:"preventOverflow"},{name:"flip"},G]}),$=Y.styles,X=Y.attributes,Q=(0,v.useDOM)().document;(0,y.useGlobalEventListener)(Q,"click",k&&A,{passive:!0});var J=c.isValidElement(t)&&(w(t)?t.ref:t.props.getRootRef),Z=(0,m.useExternRef)(j,J),ee=c.isValidElement(t)?c.cloneElement(t,(0,r.default)({},w(t)?"ref":"getRootRef",Z)):t;return(0,s.createScopedElement)(c.Fragment,null,ee,k&&null!=H&&l.createPortal((0,s.createScopedElement)(C,(0,a.default)({},O,{ref:function(e){return x(e)},arrowRef:function(e){return F(e)},style:{arrow:$.arrow,container:$.popper},attributes:{arrow:X.arrow,container:X.popper}})),K))};T.defaultProps={offsetX:0,offsetY:15,cornerOffset:0,isShown:!0,mode:"accent"};const A=T},566506:(e,t,n)=>{"use strict";n.d(t,{tooltipContainerAttr:()=>c,TooltipContainer:()=>l});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=["fixed"],c="data-tooltip-container",l=a.forwardRef((function(e,t){var n=e.fixed,a=void 0!==n&&n,l=(0,o.default)(e,s);return l[c]=a?"fixed":"true",(0,i.createScopedElement)("div",(0,r.default)({},l,{ref:t}))}))},763029:(e,t,n)=>{"use strict";n.d(t,{Touch:()=>h});var r=n(300975),o=n(309919),i=n(243835),a=n(735567),s=n(667294),c=n(970414),l=n(181498),u=n(428253),d=n(151571),_=n(214542),p=["onStart","onStartX","onStartY","onMove","onMoveX","onMoveY","onLeave","onEnter","onEnd","onEndX","onEndY","onClickCapture","usePointerHover","slideThreshold","useCapture","Component","getRootRef","noSlideClick","stopPropagation"],h=function(e){var t=e.onStart,n=e.onStartX,h=e.onStartY,f=e.onMove,m=e.onMoveX,v=e.onMoveY,g=e.onLeave,y=e.onEnter,E=e.onEnd,w=e.onEndX,b=e.onEndY,C=e.onClickCapture,S=e.usePointerHover,T=e.slideThreshold,A=void 0===T?5:T,D=e.useCapture,P=void 0!==D&&D,O=e.Component,I=void 0===O?"div":O,k=e.getRootRef,R=e.noSlideClick,M=void 0!==R&&R,L=e.stopPropagation,x=void 0!==L&&L,N=(0,i.default)(e,p),B=(0,l.useDOM)().document,U=s.useMemo(c.getSupportedEvents,[]),F=s.useRef(!1),W=s.useRef(null),V=function(e,t){x&&e.stopPropagation(),t.forEach((function(t){var n=Date.now()-W.current.startT.getTime();t&&t((0,o.default)((0,o.default)({},W.current),{},{duration:n,originalEvent:e}))}))},H=(0,d.useEventListener)(S?"pointerenter":"mouseenter",y),j=(0,d.useEventListener)(S?"pointerleave":"mouseleave",g),K=(0,d.useEventListener)(U[0],(function(e){var r,o;W.current=(r=(0,c.coordX)(e),o=(0,c.coordY)(e),{startX:r,startY:o,startT:new Date,duration:0,isPressed:!0,isY:!1,isX:!1,isSlideX:!1,isSlideY:!1,isSlide:!1,shiftX:0,shiftY:0,shiftXAbs:0,shiftYAbs:0}),V(e,[t,n,h]),$((0,c.touchEnabled)()?e.target:B)}),{capture:P,passive:!1}),z=(0,u.useExternRef)(k);function G(e){var t=W.current,n=t.isPressed,r=t.isSlide,o=t.isSlideX,i=t.isSlideY;n&&V(e,[E,i&&b,o&&w]),F.current=r,W.current={},(0,c.touchEnabled)()&&g&&g(e),$(null)}(0,_.useIsomorphicLayoutEffect)((function(){var e=z.current;H.add(e),j.add(e),K.add(e)}),[I]);var q={capture:P,passive:!1},Y=[(0,d.useEventListener)(U[1],(function(e){var t=W.current,n=t.isPressed,r=t.isX,o=t.isY,i=t.startX,a=t.startY;if(n){var s=(0,c.coordX)(e)-i,l=(0,c.coordY)(e)-a,u=Math.abs(s),d=Math.abs(l);if(e.touches&&e.touches.length>1)return G(e);if(!r&&!o){var _=u>=A&&u>d,p=d>=A&&d>u,h=_&&(!!m||!!f),g=p&&(!!v||!!f);Object.assign(W.current,{isY:p,isX:_,isSlideX:h,isSlideY:g,isSlide:h||g})}W.current.isSlide&&(Object.assign(W.current,{shiftX:s,shiftY:l,shiftXAbs:u,shiftYAbs:d}),V(e,[f,W.current.isSlideX&&m,W.current.isSlideY&&v]))}}),q),(0,d.useEventListener)(U[2],G,q),(0,d.useEventListener)(U[3],G,q)];function $(e){Y.forEach((function(t){return t.add(e)}))}return(0,a.createScopedElement)(I,(0,r.default)({},N,{onDragStart:function(e){var t=e.target;"A"!==t.tagName&&"IMG"!==t.tagName||e.preventDefault()},onClickCapture:function(e){if(!F.current)return C&&C(e);e.target.closest("a")&&e.preventDefault(),M?e.stopPropagation():C&&C(e),F.current=!1},ref:z}))}},196999:(e,t,n)=>{"use strict";n.d(t,{default:()=>r});const r=n(667294).createContext(!1)},443910:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(300975),o=n(243835),i=n(735567),a=n(119360),s=n(93781),c=n(780778),l=["children","weight","level","caps","Component"];const u=function(e){var t=e.children,n=e.weight,u=void 0===n?"regular":n,d=e.level,_=void 0===d?"1":d,p=e.caps,h=e.Component,f=void 0===h?"span":h,m=(0,o.default)(e,l),v=(0,a.usePlatform)();return(0,i.createScopedElement)(f,(0,r.default)({},m,{vkuiClass:(0,s.classNames)((0,c.getClassName)("Caption",v),"Caption--w-".concat(u),"Caption--l-".concat(_),{"Caption--caps":p})}),t)}},115446:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(300975),o=n(243835),i=n(735567),a=n(119360),s=n(93781),c=n(780778),l=["children","weight","Component"];const u=function(e){var t=e.children,n=e.weight,u=void 0===n?"regular":n,d=e.Component,_=void 0===d?"h3":d,p=(0,o.default)(e,l),h=(0,a.usePlatform)();return(0,i.createScopedElement)(_,(0,r.default)({},p,{vkuiClass:(0,s.classNames)((0,c.getClassName)("Headline",h),"Headline--w-".concat(u))}),t)}},243912:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});var r=n(300975),o=n(243835),i=n(735567),a=n(119360),s=n(93781),c=n(780778),l=["children","weight","Component"];const u=function(e){var t=e.children,n=e.weight,u=void 0===n?"regular":n,d=e.Component,_=void 0===d?"h4":d,p=(0,o.default)(e,l),h=(0,a.usePlatform)();return(0,i.createScopedElement)(_,(0,r.default)({},p,{vkuiClass:(0,s.classNames)((0,c.getClassName)("Subhead",h),"Subhead--w-".concat(u))}),t)}},455833:(e,t,n)=>{"use strict";n.d(t,{default:()=>d});var r=n(300975),o=n(243835),i=n(735567),a=n(119360),s=n(93781),c=n(780778),l=n(644029),u=["children","weight","Component","getRootRef"];(0,l.warnOnce)("Text");const d=function(e){var t=e.children,n=e.weight,l=void 0===n?"regular":n,d=e.Component,_=void 0===d?"span":d,p=e.getRootRef,h=(0,o.default)(e,u),f=(0,a.usePlatform)();return(0,i.createScopedElement)(_,(0,r.default)({},h,{ref:p,vkuiClass:(0,s.classNames)((0,c.getClassName)("Text",f),"Text--w-".concat(l))}),t)}},931252:(e,t,n)=>{"use strict";n.d(t,{default:()=>_});var r=n(300975),o=n(243835),i=n(735567),a=n(119360),s=n(93781),c=n(780778),l=n(108681),u=n(115446),d=["children","weight","level","Component"];const _=function(e){var t=e.children,n=e.weight,_=void 0===n?"regular":n,p=e.level,h=void 0===p?"1":p,f=e.Component,m=(0,o.default)(e,d),v=(0,a.usePlatform)();if(f||(f="h"+h),v===l.ANDROID&&"3"===h){var g="regular"===_?_:"medium";return(0,i.createScopedElement)(u.default,(0,r.default)({Component:f},m,{weight:g}),t)}return(0,i.createScopedElement)(f,(0,r.default)({},m,{vkuiClass:(0,s.classNames)((0,c.getClassName)("Title",v),"Title--w-".concat(_),"Title--l-".concat(h))}),t)}},525335:(e,t,n)=>{"use strict";n.d(t,{default:()=>g});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(780778),c=n(119360),l=n(256631),u=n(93781),d=n(214542),_=n(443910),p=n(243912),h=n(676056),f=n(181498),m=["photos","visibleCount","size","layout","children"],v=function(e){var t=(0,c.usePlatform)(),n=e.photos,a=e.visibleCount,v=e.size,g=e.layout,y=e.children,E=(0,o.default)(e,m),w=(0,f.useDOM)().document;(0,d.useIsomorphicLayoutEffect)((function(){(0,h.createMasks)(w)}),[w]);var b=Math.max(0,n.length-a),C=b>0&&"m"===v,S=n.slice(0,a);return(0,i.createScopedElement)("div",(0,r.default)({},E,{vkuiClass:(0,u.classNames)((0,s.getClassName)("UsersStack",t),"UsersStack--size-".concat(v),"UsersStack--l-".concat(g),{"UsersStack--others":C})}),(0,i.createScopedElement)("div",{vkuiClass:"UsersStack__photos",role:"presentation"},S.map((function(e,t){return(0,i.createScopedElement)("div",{key:t,vkuiClass:"UsersStack__photo",style:{backgroundImage:"url(".concat(e,")")}})})),C&&(0,i.createScopedElement)(_.default,{weight:"medium",level:"1",vkuiClass:"UsersStack__photo UsersStack__photo--others","aria-hidden":"true"},(0,i.createScopedElement)("span",null,"+",b))),(0,l.hasReactNode)(y)&&(0,i.createScopedElement)(p.default,{Component:"span",weight:"regular",vkuiClass:"UsersStack__text"},y))};v.defaultProps={photos:[],size:"s",visibleCount:3,layout:"horizontal"};const g=a.memo(v)},676056:(e,t,n)=>{"use strict";n.d(t,{createMasks:()=>i});var r=n(962557),o=[];function i(e){if(r.canUseDOM&&!o.includes(e)){var t=e.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttributeNS(null,"id","__SVG_MASKS_NODE__"),t.setAttributeNS(null,"width","0"),t.setAttributeNS(null,"height","0"),t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.innerHTML='<defs>\n  <clipPath id="users_stack_mask_16_left">\n    <path transform="translate(1.5 0)" d="M1.20772 8C1.20772 6.32671 0.768742 4.75626 0 3.39821C1.44342 1.34278 3.8277 0 6.52463 0C10.9293 0 14.5 3.58172 14.5 8C14.5 12.4183 10.9293 16 6.52463 16C3.8277 16 1.44342 14.6572 0 12.6018C0.768742 11.2437 1.20772 9.6733 1.20772 8Z"></path>\n  </clipPath>\n\n  <clipPath id="users_stack_mask_24_left">\n    <path d="M3.9971785,12 C3.9971785,9.49005736 3.33667467,7.13438366 2.18,5.09731189 C4.35181237,2.01417617 7.93927741,0 11.9971785,0 C18.6245955,0 23.9971785,5.372583 23.9971785,12 C23.9971785,18.627417 18.6245955,24 11.9971785,24 C7.93927741,24 4.35181237,21.9858238 2.18,18.9026881 C3.33667467,16.8656163 3.9971785,14.5099426 3.9971785,12 Z"></path>\n  </clipPath>\n\n  <clipPath id="users_stack_mask_24_right">\n    <path d="M21.8171785,5.09731189 C20.6605038,7.13438366 20,9.49005736 20,12 C20,14.5099426 20.6605038,16.8656163 21.8171785,18.9026881 C19.6453661,21.9858238 16.0579011,24 12,24 C5.372583,24 3.90798505e-14,18.627417 3.90798505e-14,12 C3.90798505e-14,5.372583 5.372583,0 12,0 C16.0579011,0 19.6453661,2.01417617 21.8171785,5.09731189 Z"></path>\n  </clipPath>\n\n  <clipPath id="users_stack_mask_32_left">\n    <path d="M2.13430019,23.9892466 C3.32858917,21.5820026 4,18.8694095 4,16 C4,13.1305905 3.32858917,10.4179974 2.13430019,8.0107534 C4.89924175,3.22241289 10.0733034,-2.30926389e-14 16,-2.30926389e-14 C24.836556,-2.30926389e-14 32,7.163444 32,16 C32,24.836556 24.836556,32 16,32 C10.0733034,32 4.89924175,28.7775871 2.13430019,23.9892466 L2.13430019,23.9892466 Z"></path>\n  </clipPath>\n\n  <clipPath id="users_stack_mask_32_right">\n    <path d="M29.8656998,8.0107534 C28.6714108,10.4179974 28,13.1305905 28,16 C28,18.8694095 28.6714108,21.5820026 29.8656998,23.9892466 C27.1007583,28.7775871 21.9266966,32 16,32 C7.163444,32 3.90798505e-14,24.836556 3.90798505e-14,16 C3.90798505e-14,7.163444 7.163444,0 16,0 C21.9266966,0 27.1007583,3.22241289 29.8656998,8.0107534 Z"></path>\n  </clipPath>\n</defs>',e.body.appendChild(t),o.push(e)}}},969985:(e,t,n)=>{"use strict";n.d(t,{default:()=>x});var r,o=n(300975),i=n(243835),a=n(640137),s=n(101226),c=n(171178),l=n(351475),u=n(682754),d=n(939844),_=n(735567),p=n(667294),h=n(93781),f=n(23220),m=n(780778),v=n(108681),g=n(763029),y=n(212602),E=n(18659),w=n(766351),b=n(946674),C=n(645083),S=n(962557),T=n(181498),A=n(909795),D=n(119501),P=n(504153),O=n(644029),I=n(28178),k=["popout","modal","platform","activePanel","splitCol","configProvider","history","nav","onTransition","onSwipeBack","onSwipeBackStart","onSwipeBackCancel","window","document","scroll"],R=(0,O.warnOnce)("View");!function(e){e[e.fail=1]="fail",e[e.success=2]="success"}(r||(r={}));var M={},L=function(e){(0,l.default)(n,e);var t=(0,u.default)(n);function n(e){var o;return(0,a.default)(this,n),o=t.call(this,e),(0,d.default)((0,c.default)(o),"scrolls",M[(0,P.getNavId)(o.props)]||{}),(0,d.default)((0,c.default)(o),"transitionFinishTimeout",void 0),(0,d.default)((0,c.default)(o),"animationFinishTimeout",void 0),(0,d.default)((0,c.default)(o),"panelNodes",{}),(0,d.default)((0,c.default)(o),"transitionEndHandler",(function(e){e&&!["vkui-animation-ios-next-forward","vkui-animation-ios-prev-back","vkui-animation-view-next-forward","vkui-animation-view-prev-back"].includes(e.animationName)||o.flushTransition(o.state.prevPanel,o.state.isBack)})),(0,d.default)((0,c.default)(o),"swipingBackTransitionEndHandler",(function(e){if(!e||null!=e&&e.propertyName.includes("transform")&&(null==e?void 0:e.target)===o.pickPanel(o.state.swipeBackNextPanel))switch(o.state.swipeBackResult){case r.fail:o.onSwipeBackCancel();break;case r.success:o.onSwipeBackSuccess()}})),(0,d.default)((0,c.default)(o),"onMoveX",(function(e){if(!(0,I.swipeBackExcluded)(e)){var t=o.props,n=t.platform,r=t.configProvider;if(n!==v.IOS||r.isWebView||!(e.startX<=70||e.startX>=o.window.innerWidth-70)||o.state.browserSwipe||o.setState({browserSwipe:!0}),n===v.IOS&&r.isWebView&&o.props.onSwipeBack){if(o.state.animated&&e.startX<=70)return;var i;if(e.startX<=70&&!o.state.swipingBack&&o.props.history.length>1&&(o.scrolls[o.state.activePanel]=o.props.scroll.getScroll().y,o.setState({swipingBack:!0,swipebackStartX:e.startX,swipeBackPrevPanel:o.state.activePanel,swipeBackNextPanel:o.props.history.slice(-2)[0]})),o.state.swipingBack)i=e.shiftX<0?0:e.shiftX>o.window.innerWidth-o.state.swipebackStartX?o.window.innerWidth:e.shiftX,o.setState({swipeBackShift:i})}}})),(0,d.default)((0,c.default)(o),"onEnd",(function(e){if(o.state.swipingBack){var t=o.state.swipeBackShift/e.duration*1e3;0===o.state.swipeBackShift?o.onSwipeBackCancel():o.state.swipeBackShift>=o.window.innerWidth?o.onSwipeBackSuccess():t>250||o.state.swipebackStartX+o.state.swipeBackShift>o.window.innerWidth/2?o.setState({swipeBackResult:r.success}):o.setState({swipeBackResult:r.fail})}})),o.state={animated:!1,visiblePanels:[e.activePanel],activePanel:e.activePanel,isBack:void 0,prevPanel:null,nextPanel:null,swipingBack:!1,swipebackStartX:0,swipeBackShift:0,swipeBackNextPanel:null,swipeBackPrevPanel:null,swipeBackResult:null,browserSwipe:!1},o}return(0,s.default)(n,[{key:"document",get:function(){return this.props.document}},{key:"window",get:function(){return this.props.window}},{key:"panels",get:function(){return p.Children.toArray(this.props.children)}},{key:"componentWillUnmount",value:function(){var e=(0,P.getNavId)(this.props);e&&(M[e]=this.scrolls)}},{key:"componentDidUpdate",value:function(e,t){var n=this;if(this.props.popout&&!e.popout&&this.blurActiveElement(),this.props.modal&&!e.modal&&this.blurActiveElement(),e.activePanel!==this.props.activePanel&&!t.swipingBack&&!t.browserSwipe){var o=this.panels.map((function(e){return(0,P.getNavId)(e.props,R)})).find((function(t){return t===e.activePanel||t===n.props.activePanel}))===this.props.activePanel;this.scrolls[e.activePanel]=this.props.scroll.getScroll().y,this.shouldDisableTransitionMotion()?this.flushTransition(e.activePanel,o):(this.blurActiveElement(),this.setState({visiblePanels:[e.activePanel,this.props.activePanel],prevPanel:e.activePanel,nextPanel:this.props.activePanel,activePanel:null,animated:!0,isBack:o}),f.animationEvent.supported||(clearTimeout(this.animationFinishTimeout),this.animationFinishTimeout=setTimeout(this.transitionEndHandler,this.props.platform===v.ANDROID||this.props.platform===v.VKCOM?300:600)))}if(e.activePanel!==this.props.activePanel&&t.swipingBack){var i=this.props.activePanel,a=e.activePanel;this.scrolls[t.swipeBackPrevPanel]=0,this.setState({swipeBackPrevPanel:null,swipeBackNextPanel:null,swipingBack:!1,swipeBackResult:null,swipebackStartX:0,swipeBackShift:0,activePanel:i,visiblePanels:[i]},(function(){n.props.scroll.scrollTo(0,n.scrolls[n.state.activePanel]),e.onTransition&&e.onTransition({isBack:!0,from:a,to:i})}))}!t.swipingBack&&this.state.swipingBack&&this.props.onSwipeBackStart&&this.props.onSwipeBackStart(),!t.swipeBackResult&&this.state.swipeBackResult&&this.waitTransitionFinish(this.pickPanel(this.state.swipeBackNextPanel),this.swipingBackTransitionEndHandler),t.swipeBackResult!==r.fail||this.state.swipeBackResult||this.props.scroll.scrollTo(0,this.scrolls[this.state.activePanel]),e.activePanel!==this.props.activePanel&&this.state.browserSwipe&&this.setState({browserSwipe:!1,nextPanel:null,prevPanel:null,animated:!1,visiblePanels:[this.props.activePanel],activePanel:this.props.activePanel})}},{key:"shouldDisableTransitionMotion",value:function(){return!1===this.props.configProvider.transitionMotionEnabled||!this.props.splitCol.animate}},{key:"waitTransitionFinish",value:function(e,t){f.transitionEvent.supported?(e.removeEventListener(f.transitionEvent.name,t),e.addEventListener(f.transitionEvent.name,t)):(clearTimeout(this.transitionFinishTimeout),this.transitionFinishTimeout=setTimeout(t,this.props.platform===v.ANDROID||this.props.platform===v.VKCOM?300:600))}},{key:"blurActiveElement",value:function(){void 0!==this.window&&this.document.activeElement&&this.document.activeElement.blur()}},{key:"pickPanel",value:function(e){return this.panelNodes[e]}},{key:"flushTransition",value:function(e,t){var n=this,r=this.props.activePanel;t&&(this.scrolls[e]=0),this.setState({prevPanel:null,nextPanel:null,visiblePanels:[r],activePanel:r,animated:!1,isBack:void 0},(function(){n.props.scroll.scrollTo(0,t?n.scrolls[r]:0),n.props.onTransition&&n.props.onTransition({isBack:t,from:e,to:r})}))}},{key:"onSwipeBackSuccess",value:function(){this.props.onSwipeBack&&this.props.onSwipeBack()}},{key:"onSwipeBackCancel",value:function(){this.props.onSwipeBackCancel&&this.props.onSwipeBackCancel(),this.setState({swipeBackPrevPanel:null,swipeBackNextPanel:null,swipingBack:!1,swipeBackResult:null,swipebackStartX:0,swipeBackShift:0})}},{key:"calcPanelSwipeStyles",value:function(e){if(!S.canUseDOM)return{};var t=e===this.state.swipeBackPrevPanel,n=e===this.state.swipeBackNextPanel;if(!t&&!n||this.state.swipeBackResult)return{};var r="".concat(this.state.swipeBackShift,"px"),o="".concat(100*this.state.swipeBackShift/this.window.innerWidth/2-50,"%"),i=.3*(this.window.innerWidth-this.state.swipeBackShift)/this.window.innerWidth;return this.state.swipeBackResult?t?{boxShadow:"-2px 0 12px rgba(0, 0, 0, ".concat(i,")")}:{}:n?{transform:"translate3d(".concat(o,", 0, 0)"),WebkitTransform:"translate3d(".concat(o,", 0, 0)")}:t?{transform:"translate3d(".concat(r,", 0, 0)"),WebkitTransform:"translate3d(".concat(r,", 0, 0)"),boxShadow:"-2px 0 12px rgba(0, 0, 0, ".concat(i,")")}:{}}},{key:"render",value:function(){var e=this,t=this.props,n=t.popout,a=t.modal,s=t.platform,c=(t.activePanel,t.splitCol,t.configProvider,t.history,t.nav,t.onTransition,t.onSwipeBack,t.onSwipeBackStart,t.onSwipeBackCancel,t.window,t.document,t.scroll,(0,i.default)(t,k)),l=this.state,u=l.prevPanel,d=l.nextPanel,p=l.activePanel,f=l.swipeBackPrevPanel,v=l.swipeBackNextPanel,y=l.swipeBackResult,E=l.isBack,w=l.animated,b=!!n,S=!!a,T=this.panels.filter((function(t){var n=(0,P.getNavId)(t.props,R);return e.state.visiblePanels.includes(n)||n===f||n===v})),A=this.shouldDisableTransitionMotion(),O={"View--animated":!A&&w,"View--swiping-back":!A&&this.state.swipingBack,"View--no-motion":A};return(0,_.createScopedElement)(g.Touch,(0,o.default)({Component:"section"},c,{vkuiClass:(0,h.classNames)((0,m.getClassName)("View",s),O),onMoveX:this.onMoveX,onEnd:this.onEnd}),(0,_.createScopedElement)("div",{vkuiClass:"View__panels"},T.map((function(t){var n=(0,P.getNavId)(t.props,R),o=w&&n===(E?u:d),i=n===u||n===f||n===v||n===d&&E;return(0,_.createScopedElement)("div",{vkuiClass:(0,h.classNames)("View__panel",{"View__panel--active":n===p,"View__panel--prev":n===u,"View__panel--next":n===d,"View__panel--swipe-back-prev":n===f,"View__panel--swipe-back-next":n===v,"View__panel--swipe-back-success":y===r.success,"View__panel--swipe-back-failed":y===r.fail}),onAnimationEnd:o?e.transitionEndHandler:null,ref:function(t){return e.panelNodes[n]=t},style:e.calcPanelSwipeStyles(n),key:n},(0,_.createScopedElement)("div",{vkuiClass:"View__panel-in",style:{marginTop:i?-e.scrolls[n]:null}},(0,_.createScopedElement)(D.NavTransitionProvider,{entering:n===d||n===v},t)))}))),(0,_.createScopedElement)(C.AppRootPortal,null,b&&(0,_.createScopedElement)("div",{vkuiClass:"View__popout"},n),S&&(0,_.createScopedElement)("div",{vkuiClass:"View__modal"},a)))}}]),n}(p.Component);(0,d.default)(L,"defaultProps",{history:[]});const x=(0,E.withContext)((0,E.withContext)((0,E.withContext)((0,y.withPlatform)((0,T.withDOM)(L)),b.SplitColContext,"splitCol"),w.ConfigProviderContext,"configProvider"),A.ScrollContext,"scroll")},28178:(e,t,n)=>{"use strict";n.d(t,{swipeBackExcluded:()=>r});function r(e){var t=e.originalEvent.target;return Boolean(null==t?void 0:t.closest("input, textarea, [data-vkui-swipe-back=false]"))}},318394:(e,t,n)=>{"use strict";n.d(t,{WriteBar:()=>p});var r=n(300975),o=n(243835),i=n(735567),a=n(667294),s=n(119360),c=n(428253),l=n(256631),u=n(181498),d=n(780778),_=["className","style","before","inlineAfter","after","value","onChange","getRootRef","getRef","onHeightChange"],p=function(e){var t=(0,s.usePlatform)(),n=e.className,p=e.style,h=e.before,f=e.inlineAfter,m=e.after,v=e.value,g=e.onChange,y=e.getRootRef,E=e.getRef,w=e.onHeightChange,b=(0,o.default)(e,_),C=null!=v,S=(0,u.useDOM)().window,T=(0,c.useExternRef)(E),A=a.useRef(null),D=function(){var e=T.current;if(e){var t=e.offsetHeight,n=e.scrollHeight,r=S.getComputedStyle(e),o=parseInt(r.paddingTop),i=parseInt(r.paddingBottom);null===A.current&&(A.current=t);var a=o+i+10;n+a<=t&&(a=0),e.style.height="0px";var s=e.scrollHeight-a/4;e.style.height=String(Math.max(s,A.current))+"px",(0,l.isFunction)(w)&&w()}};return a.useEffect((function(){D()}),[v]),(0,i.createScopedElement)("div",{ref:y,vkuiClass:(0,d.getClassName)("WriteBar",t),className:n,style:p},(0,i.createScopedElement)("form",{vkuiClass:"WriteBar__form",onSubmit:function(e){return e.preventDefault()}},(0,l.hasReactNode)(h)&&(0,i.createScopedElement)("div",{vkuiClass:"WriteBar__before"},h),(0,i.createScopedElement)("div",{vkuiClass:"WriteBar__formIn"},(0,i.createScopedElement)("textarea",(0,r.default)({},b,{vkuiClass:"WriteBar__textarea",onChange:function(e){(0,l.isFunction)(g)&&g(e),C||D()},ref:T,value:v})),(0,l.hasReactNode)(f)&&(0,i.createScopedElement)("div",{vkuiClass:"WriteBar__inlineAfter"},f)),(0,l.hasReactNode)(m)&&(0,i.createScopedElement)("div",{vkuiClass:"WriteBar__after"},m)))}},656142:(e,t,n)=>{"use strict";n.d(t,{WriteBarIcon:()=>b});var r=n(300975),o=n(939844),i=n(243835),a=n(735567),s=n(375087),c=n(284496),l=n(962633),u=n(254589),d=n(213795),_=n(21414),p=n(119360),h=n(93781),f=n(780778),m=n(108681),v=n(643831),g=n(795281),y=n(644029),E=n(256631),w=["mode","children","count"],b=((0,y.warnOnce)("WriteBarIcon"),function(e){var t,n,y=e.mode,b=e.children,C=e.count,S=(0,i.default)(e,w),T=(0,p.usePlatform)();switch(y){case"attach":t=T===m.IOS?(0,a.createScopedElement)(s.default,null):(0,a.createScopedElement)(c.default,null),n="Прикрепить файл";break;case"send":t=T===m.IOS?(0,a.createScopedElement)(l.default,null):(0,a.createScopedElement)(u.default,null),n="Отправить";break;case"done":t=T===m.IOS?(0,a.createScopedElement)(d.default,null):(0,a.createScopedElement)(_.default,null),n="Готово"}return(0,a.createScopedElement)(g.default,(0,r.default)({"aria-label":n},S,{Component:"button",hasHover:!1,activeMode:"WriteBarIcon__active",vkuiClass:(0,h.classNames)((0,f.getClassName)("WriteBarIcon",T),(0,o.default)({},"WriteBarIcon--".concat(y),!!y))}),(0,a.createScopedElement)("span",{vkuiClass:"WriteBarIcon__in"},t||b,(0,E.hasReactNode)(C)&&(0,a.createScopedElement)(v.default,{vkuiClass:"WriteBarIcon__counter",size:"s"},C)))})},780778:(e,t,n)=>{"use strict";n.d(t,{getClassName:()=>o});var r=n(108681);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,r.platform)();return"".concat(e," ").concat(e,"--").concat(t)}},633656:(e,t,n)=>{"use strict";n.d(t,{clamp:()=>r,rescale:()=>a});var r=function(e,t,n){return Math.max(t,Math.min(e,n))};function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=Math.pow(10,t);return Math.round(e*n)/n}function i(e,t,n,i){if(null==i||i<=0)return r(e,t,n);var a=("".concat(i).split(".")[1]||"").length,s=o(Math.round((e-t)/i)*i,a),c=o(Math.floor((n-t)/i)*i,a);return t+r(s,0,c)}function a(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=(e-t[0])/(t[1]-t[0])*(n[1]-n[0])+n[0];return i(o,n[0],n[1],r.step)}},672705:(e,t,n)=>{"use strict";n.d(t,{withAdaptivity:()=>s});var r=n(300975),o=n(735567),i=n(667294),a=n(362276);function s(e,t){return function(n){var s=i.useContext(a.AdaptivityContext),c=!1;(n.sizeX||n.sizeY)&&(c=!0);var l=n.sizeX||s.sizeX,u=n.sizeY||s.sizeY,d=s.viewWidth,_=s.viewHeight,p=s.hasMouse,h=s.deviceHasHover,f={};t.sizeX&&(f.sizeX=l),t.sizeY&&(f.sizeY=u),t.viewWidth&&(f.viewWidth=d),t.viewHeight&&(f.viewHeight=_),t.hasMouse&&(f.hasMouse=p),t.deviceHasHover&&(f.deviceHasHover=h);var m=(0,o.createScopedElement)(e,(0,r.default)({},n,f));return c?(0,o.createScopedElement)(a.AdaptivityContext.Provider,{value:{sizeX:l,sizeY:u,viewWidth:d,viewHeight:_,hasMouse:p,deviceHasHover:h}},m):m}}},18659:(e,t,n)=>{"use strict";n.d(t,{withContext:()=>s});var r=n(300975),o=n(939844),i=n(735567),a=n(667294);function s(e,t,n){return function(s){var c=a.useContext(t);return(0,i.createScopedElement)(e,(0,r.default)({},s,(0,o.default)({},n,c)))}}},35539:(e,t,n)=>{"use strict";n.d(t,{withInsets:()=>a});var r=n(300975),o=n(735567),i=n(720194);function a(e){return function(t){var n=(0,i.useInsets)();return(0,o.createScopedElement)(e,(0,r.default)({},t,{insets:n}))}}},212602:(e,t,n)=>{"use strict";n.d(t,{withPlatform:()=>c});var r=n(300975),o=n(735567),i=n(667294),a=n(956354),s=n(766351);function c(e){return function(t){var n=i.useContext(a.SSRContext),c=i.useContext(s.ConfigProviderContext).platform;return(0,o.createScopedElement)(e,(0,r.default)({},t,{platform:n.platform||c}))}}},324285:(e,t,n)=>{"use strict";n.d(t,{useAdaptivity:()=>i});var r=n(667294),o=n(362276),i=function(){return r.useContext(o.AdaptivityContext)}},505901:(e,t,n)=>{"use strict";n.d(t,{useAppearance:()=>i});var r=n(667294),o=n(766351),i=function(){return r.useContext(o.ConfigProviderContext).appearance}},678988:(e,t,n)=>{"use strict";n.d(t,{useEnsuredControl:()=>i});var r=n(46008),o=n(667294);function i(e,t){var n=e.hasOwnProperty("value"),i=o.useState(t.defaultValue),a=(0,r.default)(i,2),s=a[0],c=a[1],l=o.useCallback((function(t){!n&&c(t.target.value),e.onChange&&e.onChange(t)}),[e.onChange]);return[n?e.value:s,l]}},151571:(e,t,n)=>{"use strict";n.d(t,{useEventListener:()=>c});var r=n(309919),o=n(667294),i=n(256631),a=n(962557),s=n(214542);function c(e,t,n){var c=o.useRef(t);(0,s.useIsomorphicLayoutEffect)((function(){c.current=t}),[t]);var l=o.useCallback((function(e){return c.current&&c.current(e)}),[]),u=o.useRef(i.noop),d=o.useCallback((function(){u.current(),u.current=i.noop}),[]),_=o.useCallback((function(t){if(a.canUseDOM&&(d(),t)){var o=(0,r.default)({},n);t.addEventListener(e,l,o),u.current=function(){return t.removeEventListener(e,l,o)}}}),[]);return o.useEffect((function(){return d}),[]),{add:_,remove:d}}},428253:(e,t,n)=>{"use strict";n.d(t,{useExternRef:()=>i});var r=n(667294),o=n(256631);function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=r.useRef();return r.useMemo((function(){return{get current(){return i.current},set current(e){i.current=e,t.forEach((function(t){return(0,o.setRef)(e,t)}))}}}),t)}},283821:(e,t,n)=>{"use strict";n.d(t,{useGlobalEventListener:()=>i});var r=n(214542),o=n(151571);function i(e,t,n,i){var a=(0,o.useEventListener)(t,n,i);(0,r.useIsomorphicLayoutEffect)((function(){return n?a.add(e):a.remove()}),[Boolean(n)])}},720194:(e,t,n)=>{"use strict";n.d(t,{useInsets:()=>d});var r=n(46008),o=n(309919),i=n(667294),a=n(363476),s=n.n(a),c=n(214542),l={bottom:null,top:null,left:null,right:null};function u(e){var t=e.detail,n=t.type,r=t.data;switch(n){case"VKWebAppUpdateConfig":case"VKWebAppUpdateInsets":var i=r.insets;if(i)return(0,o.default)((0,o.default)({},i),{},{bottom:i.bottom>150?0:i.bottom})}return null}function d(){var e=i.useState(l),t=(0,r.default)(e,2),n=t[0],o=t[1];return(0,c.useIsomorphicLayoutEffect)((function(){function e(e){var t=u(e);t&&o(t)}return s().subscribe(e),function(){s().unsubscribe(e)}}),[]),n}s().subscribe((function(e){var t=u(e);t&&(l=t)}))},597636:(e,t,n)=>{"use strict";n.d(t,{useKeyboard:()=>s});var r=n(46008),o=n(667294),i=n(181498),a=n(283821);function s(){var e=(0,i.useDOM)(),t=e.window,n=e.document,s=o.useState({isOpened:!1,isPrecise:!1}),c=(0,r.default)(s,2),l=c[0],u=c[1],d=o.useRef(null),_={passive:!0,capture:!1};function p(e){var r,o;clearTimeout(d.current);var i={isOpened:!(!0!==e&&"focusin"!==e.type||"INPUT"!==(null===(r=n.activeElement)||void 0===r?void 0:r.tagName)&&"TEXTAREA"!==(null===(o=n.activeElement)||void 0===o?void 0:o.tagName)),isPrecise:!1};d.current=setTimeout((function(){i.isPrecise=function(e){var t=e.screen.availHeight,n=e.innerHeight;return Math.round(100*(1-n/t))>24}(t),u(i)}),300)}return o.useEffect((function(){p(!0)}),[p]),(0,a.useGlobalEventListener)(n,"focusout",p,_),(0,a.useGlobalEventListener)(n,"focusin",p,_),l}},162649:(e,t,n)=>{"use strict";n.d(t,{useKeyboardInputTracker:()=>c});var r=n(46008),o=n(667294),i=n(304830),a=n(181498),s=n(283821);function c(){var e=(0,a.useDOM)().document,t=o.useState(!1),n=(0,r.default)(t,2),c=n[0],l=n[1],u=o.useCallback((function(e){(0,i.pressedKey)(e)===i.Keys.TAB&&l(!0)}),[]),d=o.useCallback((function(){l(!1)}),[]),_={passive:!0,capture:!0};return(0,s.useGlobalEventListener)(e,"keydown",u,_),(0,s.useGlobalEventListener)(e,"mousedown",d,_),(0,s.useGlobalEventListener)(e,"touchstart",d,_),c}},854193:(e,t,n)=>{"use strict";n.d(t,{useObjectMemo:()=>o});var r=n(667294);function o(e){var t,n,o=r.useRef(e);return t=o.current,n=e,Object.keys(t).length===Object.keys(n).length&&Object.keys(t).every((function(e){return t[e]===n[e]}))||(o.current=e),o.current}},119360:(e,t,n)=>{"use strict";n.d(t,{usePlatform:()=>a});var r=n(667294),o=n(956354),i=n(766351);function a(){var e=r.useContext(o.SSRContext),t=r.useContext(i.ConfigProviderContext).platform;return e.platform||t}},855356:(e,t,n)=>{"use strict";n.d(t,{useTimeout:()=>a});var r=n(667294),o=n(214542),i=n(962557);function a(e,t){var n=r.useRef({cb:e,duration:t});(0,o.useIsomorphicLayoutEffect)((function(){n.current.cb=e,n.current.duration=t}),[e,t]);var a=r.useRef(),s=r.useCallback((function(){return i.canUseDOM&&clearTimeout(a.current)}),[]),c=r.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.current.duration;s(),i.canUseDOM&&(a.current=setTimeout((function(){var e=n.current.cb;"function"==typeof e&&e()}),e))}),[]);return(0,o.useIsomorphicLayoutEffect)((function(){return s}),[]),{set:c,clear:s}}},70743:(e,t,n)=>{"use strict";n.d(t,{useWaitTransitionFinish:()=>i});var r=n(667294),o=n(23220),i=function(){var e=r.useRef(null);return{waitTransitionFinish:function(t,n,r){t&&(o.transitionEvent.supported?(t.removeEventListener(o.transitionEvent.name,n),t.addEventListener(o.transitionEvent.name,n)):(clearTimeout(e.current),e.current=setTimeout(n,r)))}}}},86894:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Root:()=>r.default,View:()=>o.default,Panel:()=>i.Panel,PanelHeaderButton:()=>a.PanelHeaderButton,PanelHeader:()=>s.default,PanelHeaderContent:()=>c.default,PanelHeaderContext:()=>l.PanelHeaderContext,SplitLayout:()=>u.SplitLayout,SplitCol:()=>d.SplitCol,Epic:()=>_.default,Tabbar:()=>p.default,TabbarItem:()=>h.default,HorizontalScroll:()=>f.default,FixedLayout:()=>m.default,PopoutWrapper:()=>v.PopoutWrapper,Alert:()=>g.default,ActionSheet:()=>y.ActionSheet,ActionSheetItem:()=>E.default,ScreenSpinner:()=>w.default,Snackbar:()=>b.Snackbar,ModalRoot:()=>C.ModalRoot,withModalRootContext:()=>S.withModalRootContext,ModalRootContext:()=>T.default,ModalPage:()=>A.default,ModalPageHeader:()=>D.default,ModalCard:()=>P.default,ModalDismissButton:()=>O.default,Badge:()=>I.Badge,Button:()=>k.default,IconButton:()=>R.default,Card:()=>M.default,CardGrid:()=>L.default,CardScroll:()=>x.default,ContentCard:()=>N.default,CellButton:()=>B.CellButton,Header:()=>U.default,Group:()=>F.default,Gradient:()=>W.default,List:()=>V.default,Cell:()=>H.Cell,RichCell:()=>j.default,SimpleCell:()=>K.default,HorizontalCell:()=>z.HorizontalCell,Footer:()=>G.Footer,InfoRow:()=>q.default,Gallery:()=>Y.default,Avatar:()=>$.default,GridAvatar:()=>X.GridAvatar,InitialsAvatar:()=>Q.InitialsAvatar,Progress:()=>J.default,Search:()=>Z.default,Tabs:()=>ee.default,TabsItem:()=>te.default,Spinner:()=>ne.default,PullToRefresh:()=>re.default,Link:()=>oe.default,Tooltip:()=>ie.default,TooltipContainer:()=>ae.TooltipContainer,Counter:()=>se.default,UsersStack:()=>ce.default,Separator:()=>le.default,Spacing:()=>ue.Spacing,Placeholder:()=>de.default,Banner:()=>_e.default,MiniInfoCell:()=>pe.MiniInfoCell,WriteBar:()=>he.WriteBar,WriteBarIcon:()=>fe.WriteBarIcon,SubnavigationBar:()=>me.SubnavigationBar,SubnavigationButton:()=>ve.SubnavigationButton,FormLayout:()=>ge.default,FormItem:()=>ye.FormItem,FormField:()=>Ee.FormField,FormLayoutGroup:()=>we.default,FormStatus:()=>be.FormStatus,Switch:()=>Ce.Switch,File:()=>Se.default,Input:()=>Te.default,Chip:()=>Ae.default,ChipsInput:()=>De.default,Slider:()=>Pe.default,RangeSlider:()=>Oe.default,Textarea:()=>Ie.default,Radio:()=>ke.default,Checkbox:()=>Re.default,Select:()=>Me.default,SelectMimicry:()=>Le.default,NativeSelect:()=>xe.default,CustomSelect:()=>Ne.default,CustomSelectOption:()=>Be.default,DatePicker:()=>Ue.default,SliderSwitch:()=>Fe.default,Div:()=>We.default,Tappable:()=>Ve.default,Touch:()=>He.Touch,PanelSpinner:()=>je.default,PanelHeaderClose:()=>Ke.default,PanelHeaderBack:()=>ze.default,PanelHeaderSubmit:()=>Ge.default,PanelHeaderEdit:()=>qe.default,ModalCardBase:()=>Ye.ModalCardBase,AppRoot:()=>$e.AppRoot,AdaptivityProvider:()=>Xe.default,ConfigProvider:()=>Qe.default,ConfigProviderContext:()=>Je.ConfigProviderContext,Appearance:()=>Je.Appearance,Scheme:()=>Je.Scheme,WebviewType:()=>Je.WebviewType,PromoBanner:()=>Ze.default,Title:()=>et.default,Headline:()=>tt.default,Text:()=>nt.default,Caption:()=>rt.default,Subhead:()=>ot.default,withInsets:()=>it.withInsets,withPlatform:()=>at.withPlatform,withAdaptivity:()=>st.withAdaptivity,useInsets:()=>ct.useInsets,usePlatform:()=>lt.usePlatform,useAdaptivity:()=>ut.useAdaptivity,useAppearance:()=>dt.useAppearance,classNames:()=>_t.classNamesString,animate:()=>pt.default,removeObjectKeys:()=>ht.removeObjectKeys,SSRWrapper:()=>ft.SSRWrapper,platform:()=>mt.platform,ANDROID:()=>mt.ANDROID,IOS:()=>mt.IOS,VKCOM:()=>mt.VKCOM,Platform:()=>mt.Platform,IS_PLATFORM_ANDROID:()=>mt.IS_PLATFORM_ANDROID,IS_PLATFORM_IOS:()=>mt.IS_PLATFORM_IOS,getClassName:()=>vt.getClassName,ViewWidth:()=>gt.ViewWidth,ViewHeight:()=>gt.ViewHeight,SizeType:()=>gt.SizeType});n(354368);var r=n(963504),o=n(969985),i=n(623796),a=n(241073),s=n(582405),c=n(994240),l=n(961928),u=n(243143),d=n(946674),_=n(332179),p=n(780991),h=n(146881),f=n(635717),m=n(781959),v=n(949444),g=n(409380),y=n(745433),E=n(942347),w=n(106139),b=n(836392),C=n(7075),S=n(456423),T=n(811113),A=n(489124),D=n(72176),P=n(239259),O=n(443890),I=n(278763),k=n(658113),R=n(600245),M=n(138590),L=n(828204),x=n(208954),N=n(582164),B=n(935563),U=n(341238),F=n(11610),W=n(654202),V=n(639731),H=n(426162),j=n(54679),K=n(426305),z=n(698091),G=n(462926),q=n(392903),Y=n(87223),$=n(900863),X=n(456902),Q=n(575684),J=n(571042),Z=n(616852),ee=n(65309),te=n(461181),ne=n(474353),re=n(160933),oe=n(630093),ie=n(67648),ae=n(566506),se=n(643831),ce=n(525335),le=n(346921),ue=n(257451),de=n(729814),_e=n(857991),pe=n(672774),he=n(318394),fe=n(656142),me=n(800415),ve=n(197741),ge=n(590106),ye=n(18245),Ee=n(937188),we=n(380762),be=n(53961),Ce=n(763781),Se=n(617224),Te=n(383567),Ae=n(973007),De=n(517466),Pe=n(509056),Oe=n(158468),Ie=n(371411),ke=n(176469),Re=n(387130),Me=n(20362),Le=n(751467),xe=n(451155),Ne=n(836931),Be=n(596002),Ue=n(891455),Fe=n(750343),We=n(457283),Ve=n(795281),He=n(763029),je=n(749967),Ke=n(944888),ze=n(550360),Ge=n(723552),qe=n(959488),Ye=n(48908),$e=n(927101),Xe=n(133893),Qe=n(601514),Je=n(766351),Ze=n(85958),et=n(931252),tt=n(115446),nt=n(455833),rt=n(443910),ot=n(243912),it=n(35539),at=n(212602),st=n(672705),ct=n(720194),lt=n(119360),ut=n(324285),dt=n(505901),_t=n(93781),pt=n(576481),ht=n(577549),ft=n(956354),mt=n(108681),vt=n(780778),gt=n(362276)},956354:(e,t,n)=>{"use strict";n.d(t,{SSRContext:()=>c,SSRWrapper:()=>l});var r=n(735567),o=n(667294),i=n(108681),a=n(295094),s=n(181498),c=o.createContext({platform:null,userAgent:"",browserInfo:void 0}),l=function(e){var t=e.userAgent,n=e.browserInfo,o=e.children;!n&&t&&(n=(0,a.computeBrowserInfo)(t));var l={platform:(0,i.platform)(n),browserInfo:n,userAgent:t},u=(0,s.getDOM)();return(0,r.createScopedElement)(c.Provider,{value:l},(0,r.createScopedElement)(s.DOMContext.Provider,{value:u},o))}},304830:(e,t,n)=>{"use strict";n.d(t,{FOCUSABLE_ELEMENTS_LIST:()=>o,Keys:()=>r,pressedKey:()=>a,shouldTriggerClickOnEnterOrSpace:()=>s});var r,o=["a[href]","area[href]",'input:not([disabled]):not([hidden]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([hidden]):not([aria-hidden])","textarea:not([disabled])","button:not([disabled])","iframe","audio","video","[contenteditable]",'[tabindex]:not([tabindex="-1"])'];!function(e){e.ENTER="Enter",e.SPACE="Space",e.TAB="Tab",e.ESCAPE="Escape"}(r||(r={}));var i=[{code:r.ENTER,key:["Enter"],keyCode:13},{code:r.SPACE,key:["Space","Spacebar"," "],keyCode:32},{code:r.TAB,key:["Tab"],keyCode:9},{code:r.ESCAPE,key:["Escape"],keyCode:27}];function a(e){var t;return(null===(t=i.find((function(t){var n=t.key,r=t.keyCode;return n.includes(e.key)||r===e.keyCode})))||void 0===t?void 0:t.code)||null}function s(e){var t=e.target,n=t.tagName,o=t.getAttribute("role"),i=!0!==t.isContentEditable&&"INPUT"!==n&&"TEXTAREA"!==n&&("button"===o||"link"===o),s="A"===n&&t.hasAttribute("href"),c=a(e);return i&&(c===r.SPACE&&"button"===o||c===r.ENTER&&!s)}},576481:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(962557);function o(e){var t=e.duration,n=e.timing,o=e.draw;if(r.canUseDOM){var i=performance.now();requestAnimationFrame((function e(r){var a=(r-i)/t;a>1&&(a=1);var s=n(a);o(s),a<1&&requestAnimationFrame(e)}))}}},295094:(e,t,n)=>{"use strict";n.d(t,{computeBrowserInfo:()=>a});var r,o=n(962557);!function(e){e.IOS="ios",e.UNKNOWN=""}(r||(r={}));var i={};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(i[e])return i[e];var t=null,n=r.UNKNOWN,a=(0,o.detectIOS)(e),s=a.isIOS,c=a.iosMajor,l=a.iosMinor;s&&(n=r.IOS,t={major:c,minor:l});var u={userAgent:e,system:n,systemVersion:t};return i[e]=u,u}},93781:(e,t,n)=>{"use strict";n.d(t,{classNames:()=>o,classNamesString:()=>i});var r=n(38429);function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n)switch((0,r.default)(n)){case"string":e.push(n);break;case"object":for(var o in n)n[o]&&e.push(o);break;default:e.push("".concat(n))}}return e.length>1?e:e[0]||""}function i(){var e=o.apply(void 0,arguments);return"string"==typeof e?e:e.join(" ")}},95022:(e,t,n)=>{"use strict";n.d(t,{classScopingMode:()=>r});var r={_noConflict:!1,_isSet:!1,get noConflict(){return this._noConflict},set noConflict(e){this._isSet&&e!==this.noConflict&&setTimeout((function(){throw new Error("[vkui]: Single VKUI instance can not have different globalClassName settings")}),0),this._noConflict=e,this._isSet=!0}}},181498:(e,t,n)=>{"use strict";n.d(t,{getDOM:()=>s,DOMContext:()=>c,useDOM:()=>l,withDOM:()=>u,blurActiveElement:()=>d});var r=n(300975),o=n(735567),i=n(667294),a=n(962557),s=function(){return{window:a.canUseDOM?window:null,document:a.canUseDOM?document:null}},c=i.createContext(s()),l=function(){return i.useContext(c)};function u(e){return function(t){var n=l();return(0,o.createScopedElement)(e,(0,r.default)({},t,n))}}function d(e){e&&e.activeElement&&e.activeElement.blur()}},888420:(e,t,n)=>{"use strict";function r(e){return.5*(1-Math.cos(Math.PI*e))}n.d(t,{easeInOutSine:()=>r})},504153:(e,t,n)=>{"use strict";function r(e,t){return e.nav||e.id}n.d(t,{getNavId:()=>r})},921923:(e,t,n)=>{"use strict";function r(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}n.d(t,{is:()=>r})},735567:(e,t,n)=>{"use strict";n.d(t,{createScopedElement:()=>s});var r=n(667294),o=n(905017);function i(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&"vkuiClass"!==n&&(t[n]=e[n]);if(e.vkuiClass){var r=e.className,i=(0,o.prefixClass)(e.vkuiClass);t.className=r?r+" "+i:i}return t}function a(e,t){var n=arguments;if(!t||!("vkuiClass"in t))return r.createElement.apply(void 0,n);var o=n.length,a=new Array(o);a[0]=n[0],a[1]=i(t);for(var s=2;s<o;s++)a[s]=n[s];return r.createElement.apply(null,a)}a.Fragment=r.Fragment;var s=a},640784:(e,t,n)=>{"use strict";function r(e){var t=e.getBoundingClientRect();return{top:t.top,left:t.left,width:e.offsetWidth,height:e.offsetHeight}}n.d(t,{getOffsetRect:()=>r})},108681:(e,t,n)=>{"use strict";n.d(t,{Platform:()=>r,ANDROID:()=>i,IOS:()=>a,VKCOM:()=>s,platform:()=>c,IS_PLATFORM_IOS:()=>u,IS_PLATFORM_ANDROID:()=>d});var r,o=n(295094);!function(e){e.ANDROID="android",e.IOS="ios",e.VKCOM="vkcom"}(r||(r={}));var i=r.ANDROID,a=r.IOS,s=r.VKCOM;function c(e){return e||(e=(0,o.computeBrowserInfo)()),"ios"===e.system?a:i}var l=c(),u=l===a,d=l===i},354368:(e,t,n)=>{"use strict";if(n(962557).canUseDOM){var r=Element.prototype;r.matches||(r.matches=r.matchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector),r.closest||(r.closest=function(e){for(var t=this;t;){if(t.matches(e))return t;t=t.parentElement}return null})}Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var o,i,a=0|t,s=Math.max(a>=0?a:r-Math.abs(a),0);for(;s<r;){if((o=n[s])===(i=e)||"number"==typeof o&&"number"==typeof i&&isNaN(o)&&isNaN(i))return!0;s++}return!1}}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof e)throw new TypeError("callback must be a function");for(var t=Object(this),n=t.length>>>0,r=arguments[1],o=0;o<n;o++){var i=t[o];if(e.call(r,i,o,t))return i}}})},905017:(e,t,n)=>{"use strict";n.d(t,{prefixClass:()=>c});var r=n(95022),o=/\b(?=[A-Z])/g,i={},a={};function s(e){var t=r.classScopingMode.noConflict,n=t?i:a;if(n[e])return n[e];var s=e.replace(o,"vkui"),c=t||e===s?s:s+" "+e;return n[e]=c,c}function c(e){if("string"==typeof e)return s(e);for(var t="",n=0;n<e.length;n++){t+=(t?" ":"")+s(e[n])}return t}},577549:(e,t,n)=>{"use strict";n.d(t,{removeObjectKeys:()=>o});var r=n(309919);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,r.default)({},e);return t.forEach((function(e){return delete n[e]})),n}},221501:(e,t,n)=>{"use strict";n.d(t,{defaultFilterFn:()=>a});var r,o=n(143249),i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=e.indexOf(t);-1!==r;)n.push(r),r=e.indexOf(t,r+1);return n};try{r=new RegExp("\\p{L}","u")}catch(e){}var a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.label};e=e.toLocaleLowerCase();var a=n(t).toLocaleLowerCase();if(a.startsWith(e))return!0;var s=i(a,e);if(!r)return s.length>0;var c,l=(0,o.default)(s);try{for(l.s();!(c=l.n()).done;){var u=c.value;if(!r.test(a[u-1]))return!0}}catch(e){l.e(e)}finally{l.f()}return!1}},495358:(e,t,n)=>{"use strict";function r(e,t){e.style.transform=t,e.style.webkitTransform=t}n.d(t,{setTransformStyle:()=>r})},23220:(e,t,n)=>{"use strict";n.d(t,{animationEvent:()=>i,transitionEvent:()=>a});var r=n(962557),o=n(491842),i={supported:!1},a={supported:!1,name:null};r.canUseDOM&&!o.isTesting&&(("undefined"!=typeof AnimationEvent||"undefined"!=typeof WebKitAnimationEvent)&&(i.supported=!0),"undefined"!=typeof TransitionEvent?(a.supported=!0,a.name="transitionend"):"undefined"!=typeof WebKitTransitionEvent&&(a.supported=!0,a.name="webkitTransitionEnd"))},531318:(e,t,n)=>{"use strict";n.d(t,{runTapticImpactOccurred:()=>i});var r=n(363476),o=n.n(r);function i(e){o().supports("VKWebAppTapticImpactOccurred")&&o().send("VKWebAppTapticImpactOccurred",{style:e}).catch((function(){}))}},491842:(e,t,n)=>{"use strict";n.d(t,{isTesting:()=>o});var r=n(962557),o=Boolean(r.canUseDOM&&window.__isVkuiTesting)},970414:(e,t,n)=>{"use strict";n.d(t,{getSupportedEvents:()=>s,coordX:()=>o,coordY:()=>i,touchEnabled:()=>a,rubber:()=>c});var r=n(962557),o=function(e){return null!=e.clientX?e.clientX:e.changedTouches&&e.changedTouches[0].clientX},i=function(e){return null!=e.clientY?e.clientY:e.changedTouches&&e.changedTouches[0].clientY},a=function(){return r.canUseDOM&&"ontouchstart"in window};function s(){return a()?["touchstart","touchmove","touchend","touchcancel"]:["mousedown","mousemove","mouseup","mouseleave"]}function c(e,t,n,r){if(r||e<0)return e;var o=e*n;return o*t/(o+t)}},214542:(e,t,n)=>{"use strict";n.d(t,{useIsomorphicLayoutEffect:()=>o});var r=n(667294),o=n(962557).canUseDOM?r.useLayoutEffect:r.useEffect},256631:(e,t,n)=>{"use strict";n.d(t,{isFunction:()=>o,debounce:()=>i,leadingZero:()=>a,hasReactNode:()=>s,isPrimitiveReactNode:()=>c,setRef:()=>l,multiRef:()=>u,noop:()=>d,getTitleFromChildren:()=>_});var r=n(667294);function o(e){return"function"==typeof e}function i(e,t){var n;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];clearTimeout(n),n=setTimeout((function(){return e.apply(void 0,o)}),t)}}function a(e){var t=e.toFixed();return 1===t.length?"0"+t:t}function s(e){return void 0!==e&&!1!==e&&null!==e&&""!==e}function c(e){return"string"==typeof e||"number"==typeof e}function l(e,t){t&&("function"==typeof t?t(e):t.current=e)}function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=null;return{get current(){return r},set current(e){r=e,t.forEach((function(t){return l(e,t)}))}}}var d=function(){};function _(e){var t="";return r.Children.map(e,(function(e){"string"==typeof e&&(t+=e)})),t}},644029:(e,t,n)=>{"use strict";function r(e){var t={};return function(n){t[n]||(console.error("[VKUI/".concat(e,"] ").concat(n)),t[n]=!0)}}n.d(t,{warnOnce:()=>r})},563790:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{default:()=>r})},924038:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{default:()=>r})},167535:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(563790);function o(e){if(Array.isArray(e))return(0,r.default)(e)}},171178:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{default:()=>r})},640137:(e,t,n)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{default:()=>r})},101226:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,{default:()=>o})},143249:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(590961);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.default)(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}},682754:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var r=n(537300),o=n(85477),i=n(395841);function a(e){var t=(0,o.default)();return function(){var n,o=(0,r.default)(e);if(t){var a=(0,r.default)(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return(0,i.default)(this,n)}}},939844:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{default:()=>r})},300975:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{default:()=>r})},537300:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{default:()=>r})},351475:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(110720);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,r.default)(e,t)}},85477:(e,t,n)=>{"use strict";function r(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{default:()=>r})},435919:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{default:()=>r})},47455:(e,t,n)=>{"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}n.d(t,{default:()=>r})},763522:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{default:()=>r})},165418:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{default:()=>r})},309919:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(939844);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},243835:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(137771);function o(e,t){if(null==e)return{};var n,o,i=(0,r.default)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},137771:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,{default:()=>r})},395841:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(38429),o=n(171178);function i(e,t){if(t&&("object"===(0,r.default)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.default)(e)}},110720:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{default:()=>r})},46008:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(924038),o=n(47455),i=n(590961),a=n(763522);function s(e,t){return(0,r.default)(e)||(0,o.default)(e,t)||(0,i.default)(e,t)||(0,a.default)()}},239626:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(167535),o=n(435919),i=n(590961),a=n(165418);function s(e){return(0,r.default)(e)||(0,o.default)(e)||(0,i.default)(e)||(0,a.default)()}},38429:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{default:()=>r})},590961:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(563790);function o(e,t){if(e){if("string"==typeof e)return(0,r.default)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.default)(e,t):void 0}}},303741:(e,t,n)=>{"use strict";n.d(t,{detectIOS:()=>o,isIOS:()=>a,isIPadOS:()=>s});var r=n(42566);function o(e){e||(e=r.canUseDOM?navigator.userAgent.toLowerCase():"");var t=function(e){if(!r.canUseDOM)return!1;var t=!/ipad|iphone|ipod/.test(e);if(/mac os/.test(e)&&t&&"boolean"==typeof navigator.standalone)return!0;return!1}(e),n=t||-1!==e.indexOf("ipad"),o=!n&&-1!==e.search(/iphone|ipod/),i=o||n,a=i&&e.match(/OS ([\d_]+) like Mac OS X/i),s=0,c=0;t?(s=13,c=0):a&&(s=+(a=a[1].split("_"))[0],c=+a[1]),a=null;var l=s<13&&!(11===s&&c<3),u=i&&function(e){if(!r.canUseDOM)return!1;var t=window.webkit;if(t&&t.messageHandlers)return!0;var n=/constructor/i.test(String(window.HTMLElement)),o=!!window.indexedDB;if(-1===e.indexOf("safari")||-1===e.indexOf("version")||navigator.standalone){if(!o&&n||!window.statusbar||!window.statusbar.visible);else if(!n||o)return!0}else;return!1}(e),d=!1;return r.canUseDOM&&(d=i&&375===screen.width&&812===screen.height&&3===window.devicePixelRatio),{isIPad:n,isIPhone:o,isIOS:i,isIPadOS:t,iosMajor:s,iosMinor:c,isWKWebView:u,isScrollBasedViewport:l,isIPhoneX:d,isIOSChrome:-1!==e.search(/crios/i)}}var i=o(),a=(i.isIPad,i.isIPhone,i.isIOS),s=i.isIPadOS;i.iosMajor,i.iosMinor,i.isWKWebView,i.isScrollBasedViewport,i.isIPhoneX,i.isIOSChrome},186154:(e,t,n)=>{"use strict";n.d(t,{hasMouse:()=>r,hasHover:()=>o});var r,o,i=n(303741);if(n(42566).canUseDOM)if(i.isIOS&&!i.isIPadOS)r=!1,o=!1,!0,!0;else if("ontouchstart"in document||"maxTouchPoints"in navigator&&navigator.maxTouchPoints>0){var a=!/android|mobile|tablet/i.test(navigator.userAgent);r=window.matchMedia&&matchMedia("(pointer)").matches?matchMedia("(pointer: fine)").matches:a,o=r&&(window.matchMedia&&matchMedia("(hover)").matches?matchMedia("(hover: hover)").matches:a)}else r=!0,o=!0;else r=!1,!1,o=!1,!1},578844:(e,t,n)=>{"use strict";var r=n(42566);var o={supported:!1,name:"animationend"},i={supported:!1,name:"transitionend"};r.canUseDOM&&("undefined"!=typeof AnimationEvent?o.supported=!0:"undefined"!=typeof WebKitAnimationEvent&&(o.supported=!0,o.name="webkitAnimationEnd"),"undefined"!=typeof TransitionEvent?i.supported=!0:"undefined"!=typeof WebKitTransitionEvent&&(i.supported=!0,i.name="webkitTransitionEnd"))},907387:(e,t,n)=>{"use strict";n(93813)},870175:(e,t,n)=>{"use strict";var r=n(672124),o=n(42566);if(o.canUseEventListeners)try{var i=Object.defineProperty({},"passive",{get:function(){!0}});window.addEventListener("test",r.noop,i),window.removeEventListener("test",r.noop,i)}catch(e){}!function(){if(!o.canUseDOM)return!1;var e=!1;try{document.createElement("div").scrollTo({top:0,get behavior(){return e=!0,"smooth"}})}catch(e){}}()},42566:(e,t,n)=>{"use strict";n.d(t,{canUseDOM:()=>r,canUseEventListeners:()=>o});var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o=r&&!!window.addEventListener},672124:(e,t,n)=>{"use strict";n.d(t,{noop:()=>r});var r=function(){}},962557:(e,t,n)=>{"use strict";n.d(t,{noop:()=>r.noop,hasMouse:()=>o.hasMouse,hasHover:()=>o.hasHover,canUseDOM:()=>i.canUseDOM,detectIOS:()=>a.detectIOS});n(578844),n(870175),n(907387);var r=n(672124),o=(n(962638),n(368408),n(186154)),i=n(42566),a=n(303741)},93813:(e,t,n)=>{"use strict";function r(e){return e>=10?String(e):"0"+String(e)}n.d(t,{leadingZero:()=>r})},962638:(e,t,n)=>{"use strict";n(939844),n(38429)},368408:(e,t,n)=>{"use strict";n(640137),n(101226),n(939844)},46210:(e,t,n)=>{"use strict";function r(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map((function(e){e(n)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,n)}))}}}n.d(t,{default:()=>r})},467253:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g id="cancel_16__Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="cancel_16__cancel_16"><path id="cancel_16__Rectangle" d="M0 0h16v16H0z"/><path d="M8 6.73l3.46-3.47a.9.9 0 111.28 1.28L9.27 8l3.47 3.46a.9.9 0 11-1.28 1.28L8 9.27l-3.46 3.47a.9.9 0 11-1.28-1.28L6.73 8 3.26 4.54a.9.9 0 011.28-1.28L8 6.73z" id="cancel_16__Mask" fill="currentColor" fill-rule="nonzero"/></g></g></svg>',name:"cancel_16"}}n.d(t,{getIcon16Cancel:()=>r})},62816:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><clipPath id="spinner_16__a"><path d="M0 0h16v16H0z"/></clipPath><g clip-path="url(#spinner_16__a)"><path clip-rule="evenodd" d="M11.21 2.93a6 6 0 00-8.64 7.62 1 1 0 11-1.8.86A8 8 0 118 16a1 1 0 110-2 6 6 0 003.21-11.07z" fill="currentColor" fill-rule="evenodd"/></g></svg>',name:"spinner_16"}}n.d(t,{getIcon16Spinner:()=>r})},743707:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M10 2c.41 0 .75.34.75.75v6.5h6.5a.75.75 0 010 1.5h-6.5v6.5a.75.75 0 01-1.5 0v-6.5h-6.5a.75.75 0 010-1.5h6.5v-6.5c0-.41.34-.75.75-.75z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"add_20"}}n.d(t,{getIcon20Add:()=>r})},784502:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M4.72 4.72c.3-.3.77-.3 1.06 0L10 8.94l4.22-4.22a.75.75 0 111.06 1.06L11.06 10l4.22 4.22a.75.75 0 11-1.06 1.06L10 11.06l-4.22 4.22a.75.75 0 01-1.06-1.06L8.94 10 4.72 5.78a.75.75 0 010-1.06z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"cancel_20"}}n.d(t,{getIcon20Cancel:()=>r})},244030:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M17.03 4.97c.3.3.3.77 0 1.06l-9 9c-.3.3-.77.3-1.06 0l-3.5-3.5a.75.75 0 111.06-1.06l2.97 2.97 8.47-8.47c.3-.3.77-.3 1.06 0z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"check_20"}}n.d(t,{getIcon20Check:()=>r})},385023:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor"><path d="M2 4.75c0-.41.34-.75.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zM2 9.75c0-.41.34-.75.75-.75h12.5a.75.75 0 010 1.5H2.75A.75.75 0 012 9.75zM2 14.75c0-.41.34-.75.75-.75h4.5a.75.75 0 010 1.5h-4.5a.75.75 0 01-.75-.75z"/><path clip-rule="evenodd" d="M19.28 12.22c.3.3.3.77 0 1.06l-4.5 4.5c-.29.29-.76.29-1.05 0l-2.5-2.5a.75.75 0 011.05-1.06l1.97 1.97 3.97-3.97c.3-.3.77-.3 1.06 0z" fill-rule="evenodd"/></g></svg>',name:"list_add_outline_20"}}n.d(t,{getIcon20ListAddOutline:()=>r})},14377:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><clipPath id="list_play_outline_20__a"><path d="M0 0h20v20H0z"/></clipPath><g clip-path="url(#list_play_outline_20__a)" fill="currentColor"><path d="M19.68 11.43c.43.25.43.89 0 1.14l-4.73 2.84c-.42.25-.95-.06-.95-.57V9.16c0-.5.53-.82.95-.57zM2 4.75c0-.41.34-.75.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zM2 9.75c0-.41.34-.75.75-.75h7.5a.75.75 0 010 1.5h-7.5A.75.75 0 012 9.75zM2 14.75c0-.41.34-.75.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75z"/></g></svg>',name:"list_play_outline_20"}}n.d(t,{getIcon20ListPlayOutline:()=>r})},165266:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M15 8.5a1.5 1.5 0 110 3 1.5 1.5 0 010-3zm-5 0a1.5 1.5 0 110 3 1.5 1.5 0 010-3zm-5 0a1.5 1.5 0 110 3 1.5 1.5 0 010-3z" fill="currentColor"/></svg>',name:"more_20"}}n.d(t,{getIcon20More:()=>r})},685098:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#stars_20__clip0)" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 8.13a7.85 7.85 0 01-1.5 2.37A7.83 7.83 0 018.13 12c.83.37 1.72.86 2.37 1.51a7.83 7.83 0 011.5 2.37c.37-.84.86-1.72 1.51-2.37a7.83 7.83 0 012.37-1.5 7.85 7.85 0 01-2.37-1.51 7.83 7.83 0 01-1.5-2.37zm-.78-2.18c-.42 1.32-1.02 2.72-1.78 3.49-.77.77-2.17 1.36-3.49 1.78a21.07 21.07 0 01-1.16.34c-.38.1-.38.79 0 .9a27.15 27.15 0 01.91.25l.25.08c1.32.42 2.72 1.01 3.49 1.78.76.77 1.36 2.17 1.78 3.49a20.84 20.84 0 01.27.9l.07.26c.1.38.79.38.9 0a27.49 27.49 0 01.25-.91l.08-.25c.42-1.32 1.01-2.72 1.78-3.49s2.17-1.36 3.49-1.78a20.84 20.84 0 01.9-.27l.26-.07c.38-.1.38-.8 0-.9a27.49 27.49 0 01-.91-.25 20.84 20.84 0 01-.25-.08c-1.32-.42-2.72-1.01-3.49-1.78s-1.36-2.17-1.78-3.49a21.13 21.13 0 01-.34-1.16c-.1-.38-.8-.38-.9 0a27.15 27.15 0 01-.25.91 21.13 21.13 0 01-.08.25z"/><path d="M4.37.76a.39.39 0 00-.73 0L3.22 2A1.93 1.93 0 012 3.22l-1.24.41a.39.39 0 000 .74l1.24.4A1.93 1.93 0 013.22 6l.41 1.24a.39.39 0 00.74 0L4.77 6A1.93 1.93 0 016 4.78l1.24-.42a.39.39 0 000-.73L6 3.24A1.93 1.93 0 014.78 2L4.36.76z"/></g><defs><clipPath id="stars_20__clip0"><path fill="#fff" d="M0 0h20v20H0z"/></clipPath></defs></svg>',name:"stars_20"}}n.d(t,{getIcon20Stars:()=>r})},177801:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.08 2.65A2.21 2.21 0 0114.64 2c.57 0 1.14.22 1.57.65l1.14 1.14a2.21 2.21 0 010 3.13l-.94.94-9.17 9.18A3.3 3.3 0 014.9 18H3a1 1 0 01-1-1v-1.9a3.29 3.29 0 01.96-2.33l8.13-8.13 1.99-2zm2.28 4.13l.93-.92a.71.71 0 000-1.02l-1.14-1.13a.71.71 0 00-.5-.21.71.71 0 00-.51.2l-.93.93 2.15 2.15zm-3.22-1.07l-8.11 8.12a1.79 1.79 0 00-.53 1.26v1.11a.3.3 0 00.3.3h1.11c.47 0 .93-.19 1.27-.53l8.1-8.11-2.15-2.15z" fill="currentColor"/></svg>',name:"write_outline_20"}}n.d(t,{getIcon20WriteOutline:()=>r})},439026:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g id="browser_back_24__Master" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="browser_back_24__browser_back_24"><path id="browser_back_24__body" d="M0 0h24v24H0z"/><path d="M8.66 12l7.12 7.12a1.1 1.1 0 11-1.56 1.56l-7.9-7.9a1.1 1.1 0 010-1.56l7.9-7.9a1.1 1.1 0 011.56 1.56L8.66 12z" id="browser_back_24__Path" fill="currentColor" fill-rule="nonzero"/></g></g></svg>',name:"browser_back_24"}}n.d(t,{getIcon24BrowserBack:()=>r})},420130:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g id="cancel_24__Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="cancel_24__cancel_24"><path id="cancel_24__Bounds" d="M0 0h24v24H0z"/><path d="M18.3 5.7a.99.99 0 00-1.4 0L12 10.6 7.1 5.7a.99.99 0 00-1.4 1.4l4.9 4.9-4.9 4.9a.99.99 0 001.4 1.4l4.9-4.9 4.9 4.9a.99.99 0 001.4-1.4L13.4 12l4.9-4.9a.99.99 0 000-1.4z" id="cancel_24__Mask" fill="currentColor"/></g></g></svg>',name:"cancel_24"}}n.d(t,{getIcon24Cancel:()=>r})},806439:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 0a12 12 0 110 24 12 12 0 010-24zm0 1.5a10.5 10.5 0 100 21 10.5 10.5 0 000-21z" fill="currentColor"/></svg>',name:"check_circle_off_24"}}n.d(t,{getIcon24CheckCircleOff:()=>r})},219202:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 24a12 12 0 100-24 12 12 0 000 24zm6.2-14.8a1 1 0 00-1.4-1.4L10 14.58l-2.8-2.8a1 1 0 00-1.4 1.42l3.5 3.5a1 1 0 001.4 0l7.5-7.5z" fill="currentColor"/></svg>',name:"check_circle_on_24"}}n.d(t,{getIcon24CheckCircleOn:()=>r})},221324:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g id="favorite_24__Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="favorite_24__favorite_24"><path id="favorite_24__Bounds" d="M0 0h24v24H0z"/><path d="M15.34 8.48l4.43.43c1.54.15 2.02 1.65.83 2.64l-3.47 2.88 1.29 4.7c.42 1.54-.9 2.48-2.2 1.55L12 17.7l-4.21 2.98c-1.31.92-2.63 0-2.2-1.55l1.28-4.7-3.47-2.88c-1.2-1-.72-2.5.83-2.64l4.43-.43 1.95-4.5c.6-1.4 2.17-1.4 2.78 0l1.95 4.5z" id="favorite_24__Mask" fill="currentColor" fill-rule="nonzero"/></g></g></svg>',name:"favorite_24"}}n.d(t,{getIcon24Favorite:()=>r})},908928:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M12.55 4.7a.6.6 0 00-1.1 0L9.83 8.6a.9.9 0 01-.77.55l-4.13.26a.6.6 0 00-.35 1.05l3.26 2.86a.9.9 0 01.29.9l-.94 3.84a.6.6 0 00.89.66l3.47-2a.9.9 0 01.9 0l3.47 2a.6.6 0 00.88-.66l-.93-3.85a.9.9 0 01.29-.89l3.26-2.85a.6.6 0 00-.35-1.06l-4.13-.26a.9.9 0 01-.77-.56zM9.78 4a2.4 2.4 0 014.44 0l1.4 3.39 3.56.23a2.4 2.4 0 011.43 4.2l-2.86 2.5.8 3.32a2.4 2.4 0 01-3.53 2.64L12 18.54l-3.02 1.74a2.4 2.4 0 01-3.54-2.64l.8-3.32-2.85-2.5a2.4 2.4 0 011.43-4.2l3.56-.23z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"favorite_outline_24"}}n.d(t,{getIcon24FavoriteOutline:()=>r})},563175:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g id="pause_24__Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="pause_24__pause_24"><path id="pause_24__Rectangle-737" d="M0 0h24v24H0z"/><path d="M6.79 5H8.7c.45 0 .61.05.78.13.16.1.29.22.38.38.08.17.13.33.13.78V17.7c0 .45-.05.61-.13.78a.91.91 0 01-.38.38c-.17.08-.33.13-.78.13H6.8c-.45 0-.61-.05-.78-.13a.91.91 0 01-.38-.38c-.08-.17-.13-.33-.13-.78V6.3c0-.45.05-.61.13-.78.1-.16.22-.29.38-.38.17-.08.33-.13.78-.13zm8 0h1.92c.45 0 .61.05.78.13.16.1.29.22.38.38.08.17.13.33.13.78V17.7c0 .45-.05.61-.13.78a.91.91 0 01-.38.38c-.17.08-.33.13-.78.13H14.8c-.45 0-.61-.05-.78-.13a.91.91 0 01-.38-.38c-.08-.17-.13-.33-.13-.78V6.3c0-.45.05-.61.13-.78.1-.16.22-.29.38-.38.17-.08.33-.13.78-.13z" id="pause_24__Mask" fill="currentColor"/></g></g></svg>',name:"pause_24"}}n.d(t,{getIcon24Pause:()=>r})},996512:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.67 10.92c.82.49.82 1.67 0 2.16l-8.79 5.17c-.83.5-1.88-.1-1.88-1.08V6.83c0-.97 1.05-1.57 1.88-1.08l8.8 5.17z" fill="currentColor"/></svg>',name:"play_24"}}n.d(t,{getIcon24Play:()=>r})},60804:(e,t,n)=>{"use strict";function r(){return{icon:'<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M16.4 5.08A8.2 8.2 0 004.57 15.49a.9.9 0 01-1.63.77A10 10 0 1112 22a.9.9 0 010-1.8 8.2 8.2 0 004.4-15.12z" fill="currentColor" fill-rule="evenodd"/></svg>',name:"spinner_24"}}n.d(t,{getIcon24Spinner:()=>r})},785039:(e,t,n)=>{"use strict";function r(){return{icon:'<svg width="56" height="56" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M28 52a24 24 0 100-48 24 24 0 000 48z" fill="#FC3"/><path fill-rule="evenodd" clip-rule="evenodd" d="M31.86 40.86a1.29 1.29 0 010 2.57h-7.72a1.29 1.29 0 010-2.57h7.72zm-1.29-12c.86-.86 1.72 1.71 6 1.71 3.43 0 6.43-1.71 6.86-.86.43.86-2.57 4.29-6.86 4.29-5.14 0-6.86-4.29-6-5.14zm-5.14 0c.86.85-.86 5.14-6 5.14-4.29 0-7.29-3.43-6.86-4.29.43-.85 3.43.86 6.86.86 4.28 0 5.14-2.57 6-1.71zm9.43-10.29c.85-.86 2.57 2.14 6 3.43s4.28 1.29 4.28 2.57c0 .86-.85 1.72-5.14 0-4.29-1.71-6-5.14-5.14-6zm-13.72 0c.86.86-.85 4.29-5.14 6-4.29 1.72-5.14.86-5.14 0 0-1.28.85-1.28 4.28-2.57 3.43-1.29 5.15-4.29 6-3.43z" fill="#805446"/></svg>',name:"pensive_face_56"}}n.d(t,{getIcon56PensiveFace:()=>r})},626555:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});n(751876);var r=n(667294);n(45697);class o extends r.Component{static mapFilterOptionsToDropdownOptions(e){return e?e.map((e=>[e.constant,e.name])):[]}constructor(e){super(e),this.state={filterWrapElementId:this.props.config.id+"_filter_wrap",filterElementId:this.props.config.id+"_filter"}}componentDidMount(){var e=this.props.config.placeholder||"",t=this.onChange.bind(this);this.state.input=new Dropdown(ge(this.state.filterElementId),o.mapFilterOptionsToDropdownOptions(this.props.config.options),{selectedItems:this.props.config.selected,onChange:t,placeholder:e,multiselect:!this.props.singleSelectCrutch,autocomplete:!0,width:this.props.width,big:!0,maxItems:this.props.maxItems})}componentDidUpdate(e,t,n){if(this.props.config.selected!==e.config.selected&&Array.isArray(this.props.config.selected)&&0===this.props.config.selected.length)this.state.input.clear();else if(this.props.singleSelectCrutch){var r=this.state.input.selectedItems(),o=r&&r[0]&&r[0][0]?r[0][0]:null;if(!o)return;this.props.config.selected!==e.config.selected&&o!=this.props.config.selected&&this.state.input.selectItem(this.props.config.selected[0])}}onChange(e){var t=o.convertOldValueToJson(e);this.props.onFilterChange(this.props.config.id,t)}static convertOldValueToJson(e){return e?e.split(","):null}render(){var e=this.props.config.header?r.createElement("div",{className:"search_filter_main"},this.props.config.header):"";return r.createElement("div",{className:"filter"},e,r.createElement("div",{id:this.state.filterWrapElementId,className:"search_control"},r.createElement("input",{id:this.state.filterElementId,type:"text",className:"dark"})))}}o.defaultProps={width:200,maxItems:50,singleSelectCrutch:!1}},336680:(e,t,n)=>{"use strict";n.d(t,{SECOND:()=>r,MINUTE:()=>o,HOUR:()=>i,DAY:()=>a,WEEK:()=>s,MONTH:()=>c,ruLocale:()=>l,EVENTS:()=>u});var r=1e3,o=60*r,i=60*o,a=24*i,s=7*a,c=30*a,l="ru-RU",u={MOUSE_DOWN:"mousedown",KEY_DOWN:"keydown",SCROLL:"scroll",CLICK:"click"}},222994:(e,t,n)=>{"use strict";n.d(t,{AudioAds:()=>a});n(66108),n(296253),n(751876);var r=n(570313),o=n(200134),i=n(12733);class a{constructor(e,t,n){this._isPlaying=!1,this._adsCurrentProgress=0,this._adman=null,this._admanLoaded=!1,this._adEvents=[],this.player=e||{},this.playerVersion=t||null,this._startAdsTO=null,this._adsConfig=null,this._duration=0,this.isMvk=Boolean(n),this.adsStatUrl=this.isMvk?"audio":"al_audio.php"}isPlaying(){return this._isPlaying}setAdsConfig(e){this._adsConfig=e}getCurrentProgress(){return this._adsCurrentProgress}getDuration(){return this._duration}loadAdman(e){var t=t=>e&&e(t);if(this._admanLoaded)t();else{var n=0;(0,r.loadScript)(a.ADMAN_SRC,{onLoad:()=>{this._admanLoaded=!0,t()},onError:()=>{window.abp?(this._admanLoaded=!0,t()):(3===(n+=1)&&(this._admanLoaded=!0),t("script_load_fail"))}})}}_fetchAd(e,t,n,r,i){this.loadAdman((c=>{if(!window.AdmanHTML)return this._sendEvent("no_adman",t,a.AD_TYPE,c),r&&r();this._adman=new AdmanHTML;var l=this._adsConfig||vk.audioAdsConfig||window.audioAdsConfig,u={_SITEID:276,ver:251116,vk_id:vk.id,duration:e.duration,content_id:s(e.ownerId,e.id),vk_catid:a.CAT_IDS[t]||a.CAT_IDS.other,sign:l.sign||""};extend(u,e.ads||{}),nav.objLoc&&nav.objLoc.preview&&(u.preview=intval(nav.objLoc.preview)),cur.adsPreview&&(u.preview=1,u.vk_id=398724832),this._adman.setDebug(!!u.preview),this._adman.onError((()=>r&&r())),this._adman.onReady((()=>{if(this._adman){var e=this._adman.getBannersForSection(a.AD_TYPE);e&&e.length?"statistics"===e[0].type?(this._play(!0,t),r&&r()):(this._sendEvent("received",t),n?(this._sendEvent("rejected",t,a.AD_TYPE,i),this.deinit(),r&&r()):(this._sendEvent("ready",t),this.player.notify(o.events.AD_READY),this._play(!1,t,r))):(n||this._sendEvent("not_received",t),r&&r())}})),this._adman.init({slot:3514,wrapper:this.isMvk?ce("div"):se("<div></div>"),params:u,browser:{adBlock:!!window.abp,mobile:!1}}),this._sendEvent("requested",t)}))}_sendEvent(e,t,n,r){var o=n?"/"+n:"",i=r?"/"+r:"";this._adEvents.push(e+"/"+t+o+i),clearTimeout(this._adEventDelay),this._adEventDelay=setTimeout((()=>{ajax.post(this.adsStatUrl,{act:"ad_event",events:this._adEvents.join(","),v:this.playerVersion,abp:intval(window.abp)},{onFail:()=>!0}),this._adEvents=[]}),500)}_play(e,t,n){this._adman.onCompleted((()=>{this.deinit(!0),e?this._sendEvent("statistics",t):(this.player.notify(o.events.PROGRESS,0),this.player.notify(o.events.AD_COMPLETED),this._isPlaying=!1,this._adsCurrentProgress=0,this._sendEvent("completed",t),window.setDocumentTitle&&window.setDocumentTitle(this._adsPrevTitle),n&&n())})),this._adman.onStarted((()=>{e||(this.player.setIsPlaying(!0),this.player.notify(o.events.PLAY),this.player.notify(o.events.PROGRESS,0),this.player.notify(o.events.AD_STARTED),this.updateVolume(),this._sendEvent("started",t),window.statlogsValueEvent&&statlogsValueEvent("audio_web_ad_link","show"))})),this._adman.onPaused((()=>{this.player.setIsPlaying(!1),this.player.notify(o.events.PAUSE)})),this._adman.onPlayed((()=>{this.player.setIsPlaying(!0),this.player.notify(o.events.PLAY)}));var r=[.25,.5,.75];if(this._adman.onTimeRemained((e=>{this._duration=isNaN(e.duration)?0:e.duration,this._adsCurrentProgress=(isNaN(e.percent)?0:e.percent)/100,this.player.notify(o.events.PROGRESS,this._adsCurrentProgress,this._duration),each(r,((e,n)=>{if(this._adsCurrentProgress>=n)return r.shift(),this._sendEvent("progress_"+intval(100*n),t),!1}))})),this._adman.start(a.AD_TYPE),e)return n&&n();this._isPlaying=!0,this._adsPrevTitle=document.title,this.isMvk||setDocumentTitle(getLang("global_audio_ad"))}updateVolume(){this._adman&&this._adman.setVolume(.7*this.player.getVolume())}deinit(e){this._adman=null,!e&&this.player.notify(o.events.AD_DEINITED)}pause(){this._adman&&(this.player.setIsPlaying(!1),this._adman.pause())}stop(){this._adman&&(this.player.setIsPlaying(!1),this._adman.stop())}resume(){this._adman&&(this.player.setIsPlaying(!0),this._adman.resume(),this.player.notify(o.events.PLAY))}checkPlay(e,t){var n=this.player._getPlayingContextSection(),r=this._isAllowed(e),o=r.type,i=r.reason,s=()=>t&&t();switch(o){case a.ALLOW_ALLOWED:this._fetchAd(e,n,!1,s);break;case a.ALLOW_DISABLED:s();break;case a.ALLOW_REJECT:this._fetchAd(e,n,!0,!1,i),s()}}hasAdsSupport(){var e=intval(browser.version.split(".")[0]);return!(browser.safari&&e<14||browser.chrome&&e<50)}_isAllowed(e){if(vk.widget)return{type:a.ALLOW_DISABLED};if((0,i.isPodcast)(e))return{type:a.ALLOW_DISABLED};var t=this._adsConfig||vk.audioAdsConfig||window.audioAdsConfig;if(t){if(!t.enabled||!this.hasAdsSupport())return{type:a.ALLOW_DISABLED};if(cur.adsPreview)return{type:a.ALLOW_ALLOWED};if(t.day_limit_reached)return{type:a.ALLOW_REJECT,reason:a.REJECT_REASON_LIMIT};var n=this.player._getPlayingContextSection();return t.sections.indexOf(n)>-1?{type:a.ALLOW_ALLOWED}:{type:a.ALLOW_REJECT,reason:a.REJECT_REASON_SECTION}}return{type:a.ALLOW_REJECT,reason:a.REJECT_REASON_UNKNOWN}}startPlay(e,t){this.checkPlay(e,t)}}function s(e,t){for(var n=e.toString(16),r=t.toString(16);r.length<8;)r="0"+r;return n+r}a.ADMAN_SRC="//ad.mail.ru/static/admanhtml/rbadman-html5.min.js",a.CAT_IDS={my:101,my_playlists:101,audio_feed:109,recent:113,user_wall:104,group_wall:104,user_list:102,group_list:103,user_playlists:102,group_playlists:103,feed:105,search:110,global_search:110,replies:104,im:106,group_status:104,user_status:104,recs:107,recs_audio:107,recs_album:107,other:114},a.AD_TYPE="preroll",a.ALLOW_DISABLED=1,a.ALLOW_ALLOWED=2,a.ALLOW_REJECT=3,a.REJECT_REASON_UNKNOWN="unknown",a.REJECT_REASON_LIMIT="track_limit_exceeded",a.REJECT_REASON_SECTION="section_not_allowed"},200134:(e,t,n)=>{"use strict";n.d(t,{events:()=>r});var r={CURRENT_CHANGED:"curr",PLAY:"start",PLAY_REQUESTED:"request_play",PAUSE:"pause",STOP:"stop",UPDATE:"update",LOADED:"loaded",ENDED:"ended",FAILED:"failed",BUFFERED:"buffered",PROGRESS:"progress",VOLUME:"volume",PLAYLIST_CHANGED:"plchange",ADDED:"added",REMOVED:"removed",FREQ_UPDATE:"freq",SEEK:"seek",PLAY_NEXT:"play_next",AD_READY:"ad_ready",AD_DEINITED:"ad_deinit",AD_STARTED:"ad_started",AD_COMPLETED:"ad_completed",START_LOADING:"start_load",CAN_PLAY:"actual_start",SELECT:"select",DESELECT:"deselect",EMPTY_PLAYLIST:"empty_playlist",NOT_FOUND_PLAYLIST:"not_found_playlist",INIT:"init",REQUEST_EXPANDED:"request_expanded",MUSIC_AUDIOS_ADD:"music_audios_add",MUSIC_AUDIOS_DELETE:"music_audios_delete",MUSIC_PLAYLISTS_ADD:"music_playlists_add",MUSIC_OWNERS_FOLLOW:"music_owners_follow",MUSIC_OWNERS_UNFOLLOW:"music_owners_unfollow",CURATOR_FOLLOW:"curator_follow",CURATOR_UNFOLLOW:"curator_unfollow"}},615152:(e,t,n)=>{"use strict";n.d(t,{AudioPlayerHTML5:()=>a});n(940851),n(296253);var r=n(366792),o=n(471323),i=n(318941);class a{constructor(e){this.type="html5",this.opts=e||{},this._audioNodes=[],this._currentAudioEl=this._createAudioNode(),this._prefetchAudioEl=this._createAudioNode()}destroy(){}getPlayedTime(){for(var e=this._currentAudioEl.played,t=0,n=0;n<e.length;n++)t+=e.end(n)-e.start(n);return t}getCurrentTime(){return this._currentAudioEl.currentTime}clearAudioNode(){this._currentAudioEl=this._createAudioNode(o.SILENCE)}isCurrent(e){return e===this._currentAudioEl}_createAudioNode(e){var t=new i.AudioHlsNode({onBufferUpdate:()=>{this.isCurrent(t)&&this.opts.onBufferUpdate(this.getCurrentBuffered())},onProgressUpdate:()=>{this.isCurrent(t)&&this.opts.onProgressUpdate(this.getCurrentProgress(),this.getPlayedTime(),this.getCurrentTime())},onEnd:()=>{this.isCurrent(t)&&t.src!==o.SILENCE&&this.opts.onEnd()},onSeeked:()=>{this.isCurrent(t)&&this.opts.onSeeked()},onSeek:()=>{this.isCurrent(t)&&this.opts.onSeek()},onFail:e=>{this._prefetchAudioEl===t?this._prefetchAudioEl=this._createAudioNode():this.isCurrent(t)&&t.src!==o.SILENCE&&(this._hlsError=e,this.opts.onFail&&this.opts.onFail())},onDurationChange:()=>{this.isCurrent(t)&&this._seekOnReady&&t.duration>0&&(this.seek(this._seekOnReady),this._seekOnReady=!1)},onCanPlay:()=>{this.isCurrent(t)&&this.opts.onCanPlay&&this.opts.onCanPlay()},onPause:this.opts.onPause,onPlay:this.opts.onPlay,volume:this.hasOwnProperty("_volume")?this._volume:this.opts.defaultVolume},e);return t}onReady(e){e()}prefetch(e){this._prefetchAudioEl&&this._prefetchAudioEl.url===(0,r.audioUnmaskSource)(e)||(this._prefetchAudioEl=this._createAudioNode(e))}seek(e){var t=this._currentAudioEl;t.duration>0&&t.src&&t.src!==o.SILENCE?t.currentTime=t.duration*e:this._seekOnReady=e}setVolume(e){void 0===e&&(e=this._currentAudioEl.volume),this._currentAudioEl.volume=e,this._prefetchAudioEl&&(this._prefetchAudioEl.volume=e),this._volume=e}setPlaybackRate(e){this._currentAudioEl.playbackRate=e}getCurrentProgress(){return this._currentAudioEl.currentProgress}getCurrentBuffered(){return this._currentAudioEl&&this._currentAudioEl.currentBuffered}getDuration(){return this._currentAudioEl&&this._currentAudioEl.duration}isFullyLoaded(){return this._currentAudioEl.isFullyLoaded}setUrl(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};if(!e)return n&&n(!1);var i=(0,r.audioUnmaskSource)(e),a=this._currentAudioEl;if(this._currentAudioEl.src&&this._currentAudioEl.src!==o.SILENCE&&(this._seekOnReady=!1),this._currentAudioEl.src===i)return this.opts.onCanPlay&&this.opts.onCanPlay(),void(n&&n(!0));if(this._prefetchAudioEl){if(this._prefetchAudioEl.src===i)return this._currentAudioEl.pause(),this._currentAudioEl.setUrl(o.SILENCE),this._prefetchAudioEl.readyState>=3&&setTimeout((()=>this.opts.onCanPlay&&this.opts.onCanPlay())),this._currentAudioEl=this._prefetchAudioEl,this._prefetchAudioEl=null,void(n&&n(!0));i!==o.SILENCE&&this._prefetchAudioEl.setUrl(o.SILENCE)}a.src!==i&&(t=a.setUrl(i).then((()=>this._stopFrequencyAnalise()))),t?t.then((()=>n(!0))).catch((()=>n(!1))):n(!0)}play(){this._stopFrequencyAnalise();var e=this._currentAudioEl;if(e.src){var t=e.play();return this._startFrequencyAnalise(),t}return Promise.resolve()}preparePlay(){if(browser.safari)return this._currentAudioEl.play()}_startFrequencyAnalise(){function e(e,t,n,r){return(n-t)*e/r+t}function t(e,t){return Math.random()*(t-e)+e}this._stopFrequencyAnalise();var n=999,r=null,o=null;this._freqUpdateInterval=setInterval((()=>{var i;this._currentAudioEl.paused?i=[0,0,0,0]:(++n>3&&(n=0,r=o,o=[t(.7,1),t(.55,.8),t(.3,.55),t(.03,.45)],r||(r=[t(.7,1),t(.55,.8),t(.3,.55),t(.03,.45)])),i=[e(n,r[0],o[0],3),e(n,r[1],o[1],3),e(n,r[2],o[2],3),e(n,r[3],o[3],3)]),this.opts.onFrequency&&this.opts.onFrequency(i)}),50)}_stopFrequencyAnalise(){clearInterval(this._freqUpdateInterval),this.opts.onFrequency&&this.opts.onFrequency([0,0,0,0])}pause(){this._currentAudioEl.pause(),this._stopFrequencyAnalise()}stop(){this._currentAudioEl.pause(),this.seek(0),this._stopFrequencyAnalise()}_setFadeVolumeInterval(e){if(e){if(!this._fadeVolumeWorker&&window.Worker&&window.Blob){var t=new Blob(["\n          var interval;\n          onmessage = function(e) {\n            clearInterval(interval);\n            if (e.data == 'start') {\n              interval = setInterval(function() { postMessage({}); }, 20);\n            }\n          }\n        "]);try{this._fadeVolumeWorker=new Worker(window.URL.createObjectURL(t))}catch(e){this._fadeVolumeWorker=!1}}this._fadeVolumeWorker?(this._fadeVolumeWorker.onmessage=e,this._fadeVolumeWorker.postMessage("start")):this._fadeVolumeInterval=setInterval(e,60)}else this._fadeVolumeWorker&&(this._fadeVolumeWorker.terminate(),this._fadeVolumeWorker=null),this._fadeVolumeInterval&&clearInterval(this._fadeVolumeInterval)}fadeVolume(e,t,n){e=Math.max(0,Math.min(1,e));var r=this._currentAudioEl,o=0;if(t){var i=e-r.volume;o=i/(t/20||1)}else o=e<r.volume?-.06:.001;if(Math.abs(e-r.volume)<=.001)return this._setFadeVolumeInterval(),n&&n();var a=r.volume;this._setFadeVolumeInterval((()=>{!t&&o>0&&(o*=1.35),a+=o;if(o<0?a<=e:a>=e)return this.setVolume(e),this._setFadeVolumeInterval(),n&&n();this.setVolume(a)}))}getErrorData(){var e=this._currentAudioEl.error||{};return{is_hls:this._currentAudioEl.hls?1:0,url:this._currentAudioEl.src,error_code:e.code,error_message:e.message,hls_error:this._hlsError?JSON.stringify(this._hlsError):null}}}},185850:(e,t,n)=>{"use strict";n.d(t,{TYPE_ADDED:()=>d,TYPE_REMOVED:()=>_,TYPE_RECOMMENDATION_REMOVED:()=>p,TYPE_SHOW_ALBUM:()=>h,TYPE_SHARE_AUDIO:()=>f,TYPE_BROADCASTING:()=>w,SUBTYPE_UPLOAD:()=>R,SUBTYPE_ON:()=>M,SUBTYPE_OFF:()=>L,AudioStats:()=>F});n(175115),n(530522),n(66108),n(296253),n(991181),n(579665),n(95767),n(751876);var r=n(343860),o=n(609720),i=n(479957),a=n(171171),s=n(26330);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var d="added",_="removed",p="recommendation_removed",h="show_album",f="share_audio",m="start",v="stop",g="volume",y="rewind",E="play_further",w="broadcast",b="default",C="next_track",S="prev_track",T="auto",A="interruption",D="pause",P="new",O="close_app",I="queue",k="pause",R="upload",M="on",L="off",x="session_end",N={[m]:1,[v]:2,[g]:3,[y]:4,[E]:5,[d]:6,[_]:7,[p]:8,[h]:9,[f]:10,[w]:11,curator:12},B={[b]:1,[C]:2,[S]:3,[T]:4,[A]:5,[D]:6,[P]:7,[O]:8,[I]:9,[k]:10,[R]:11,[M]:12,[L]:13,follow:14,unfollow:15},U="audio_unique_unauth_id";class F{constructor(e){if(this.playerAdapter=e,this.listenedData=null,this.sendTimeout=null,this.currentAudioId=null,this.currentAudio=null,this.currentAudioTrackCode=null,this.pausedAudioId=null,this.playlistChanged=!1,this.currentPosition=0,this.currentListened=0,this.playedTime=0,this.adsCompleted=!1,this.wasEnded=!1,vk.id)this.uniqueUserId=null;else{var t=s.default.get(U);t?this.uniqueUserId=t:(this.uniqueUserId=a(),s.default.set(U,this.uniqueUserId))}this.debug=e.isDebug(),this.onVolume=(0,o.debounce)(this.onVolume.bind(this),300),this.playerAdapter.listenPlay(this.onPlay,this),this.playerAdapter.listenPause(this.onPause,this),this.playerAdapter.listenStop(this.onPause,this),this.playerAdapter.listenProgress(this.onProgress,this),this.playerAdapter.listenVolume(this.onVolume,this),this.playerAdapter.listenSeek(this.onSeek,this),this.playerAdapter.listenPlaylistChanged(this.onPlaylistChanged,this),this.playerAdapter.listenEnded(this.onEnded,this),this.playerAdapter.listenPlayNext(this.onPlayNext,this),this.playerAdapter.listenAdCompleted(this.onAdCompleted,this),this.onPageClose=this.onPageClose.bind(this)}listenOnBeforeUnload(){addEvent(window,"beforeunload",this.onPageClose)}stopListenOnBeforeUnload(){removeEvent(window,"beforeunload",this.onPageClose)}canOperate(){return!this.playerAdapter.isPodcast()&&!this.playerAdapter.isArticleTts()&&!this.playerAdapter.isAdPlaying()}getCurrentAudioParams(){var e=this.currentAudioId||this.playerAdapter.getAudioId();if(e){var t=l(e.split("_"),2);return{ownerId:t[0],audioId:t[1],trackCode:this.currentAudioTrackCode||this.playerAdapter.getAudioTrackCode()}}return{}}getEnvParams(){return{state:this.playerAdapter.getState(),context:this.playerAdapter.getContext(),ref:window.cur&&vk.widget?String(cur.widgetReferrer||"").substring(0,20):""}}getListenedTime(){return Math.round(this.playerAdapter.getListenedTime())||0}getPlaySubtype(){if(this.playerAdapter.isAutoPlayed())return T;var e=this.playerAdapter.getSequence();if(e)return e>0?C:S;var t=this.pausedAudioId,n=this.playerAdapter.getAudioId();return t&&n===t?D:P}onPlay(){if(this.canOperate()){var e=this.playerAdapter.getAudio(),t=e.fullId,n=this.currentAudioId===t||!this.currentAudioId,r=this.currentAudioId!==this.pausedAudioId,o=this.playerAdapter.getListenedTime();!n&&r&&this.onTrackSwitch(this.currentAudio,this.currentPlaylistId),this.playedTime=vkNow(),this.currentAudioId=t,this.currentAudio=e,this.currentAudioTrackCode=this.playerAdapter.getAudioTrackCode(),this.currentPlaylistId=this.playerAdapter.getPlaylistId(),this.wasEnded||this.playerAdapter.hasPrevAudio()&&(!this.pausedAudioId||this.playerAdapter.isAutoPlayed())?(this.currentPosition=0,o=0):this.currentPosition=this.playerAdapter.getProgressInSeconds(),this.currentListened=o,this.sendCurrentAudioEvent({type:m,subtype:this.getPlaySubtype(),position:this.currentPosition,listened:o}),this.pausedAudioId=null,this.playlistChanged=!1,this.wasEnded=!1,this.listenOnBeforeUnload()}}onPause(){var e=this.playerAdapter.getAudioId();if(this.canOperate()&&e){var t=this.collectListenedData();this.sendListenedDataDelayed(1e3,t),setTimeout((()=>{if(!(this.currentAudio&&e!==this.currentAudio.fullId||vkNow()-this.playedTime<150)){this.pausedAudioId=e;var t=this.playerAdapter.getPausedBy(this.playedTime);this.sendCurrentAudioEvent({type:v,subtype:t?t===I?I:A:k})}}),100),this.stopListenOnBeforeUnload()}}onProgress(){this.playerAdapter.getProgress()<.01||!this.playerAdapter.isPlaying()||(this.currentPosition=this.playerAdapter.getProgressInSeconds(),this.currentListened=this.playerAdapter.getListenedTime(),!this.pausedAudioId&&vkNow()-this.playedTime>150&&this.collectListenedData(),this.adsCompleted&&(this.sendCurrentAudioEvent({type:m,subtype:this.getPlaySubtype(),position:this.currentPosition}),this.adsCompleted=!1))}onVolume(){this.canOperate()&&this.sendCurrentAudioEvent({type:g,subtype:b})}onSeek(){if(this.canOperate()){var e={position:this.currentPosition,positionTo:this.playerAdapter.getProgressInSeconds()};e.position!==e.positionTo&&this.sendCurrentAudioEvent(c({type:y,subtype:b},e))}}onPlaylistChanged(){this.canOperate()&&(this.playlistChanged=!0)}onEnded(){this.listenedData&&this.playerAdapter.isLastTrack()&&(this.listenedData.end_stream_reason=x),this.wasEnded=!0,this.playerAdapter.isRepeatCurrentAudio()?(this.sendCurrentAudioEvent({type:v,subtype:T}),this.collectListenedData(),this.sendListenedData()):this.sendListenedDataDelayed(150)}onPlayNext(e,t){if(this.canOperate()){var n=l(t.split("_"),2),r=n[0],o=n[1];this.sendAudioEvent({type:E,subtype:b,ownerId:r,audioId:o})}}onAdCompleted(){this.adsCompleted=!0}onTrackSwitch(e,t){if(e){var n=P,r=this.playerAdapter.getSequence(),o=l(e.fullId.split("_"),2),i=o[0],a=o[1];this.playerAdapter.isAutoPlayed()?n=T:r&&(n=r>0?C:S),this.sendCurrentAudioEvent({type:v,subtype:n,position:this.currentPosition,listened:this.currentListened,trackCode:e.trackCode,playlistId:t,ownerId:i,audioId:a}),this.wasEnded=!0,this.collectListenedData(e),this.collectListenedDataSwitch();var s=this.listenedData;this.listenedData=null,this.sendListenedData(s)}}onPageClose(){this.playerAdapter.isPlaying()&&(this.sendCurrentAudioEvent({type:v,subtype:O}),this.sendListenedData())}collectListenedDataSwitch(){if(this.listenedData){if(this.listenedData.end_stream_reason===x)return;var e=this.playerAdapter.isAutoPlayed(),t=this.getListenedTime(),n=this.playerAdapter.getSequence(),r=null;n&&!e?r=n>0?"next_btn":"prev":this.playlistChanged&&(r="playlist_change"),!r&&e&&(r="playlist_next"),this.listenedData.end_stream_reason=r||"new",t&&(this.listenedData.listened=t)}}collectListenedData(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null)||this.currentAudio;if(this.canOperate()&&e){var t=e.fullId,n=e.trackCode||this.playerAdapter.getAudioTrackCode(),r=this.getListenedTime(),o=e.urlHash;if(o||console.log("no url hash"),r&&o){var i={audio_id:t,listened:r,context:this.playerAdapter.getContext(),hash:o};return window.cur&&vk.widget&&(i.ref=cur.widgetReferrer||""),this.playerAdapter.hasSearchParams()&&(i.search_params=JSON.stringify(this.playerAdapter.getSearchParams())),this.playerAdapter.hasPlaylist()&&(this.playerAdapter.isRealPlaylist()&&(i.playlist_id=this.playerAdapter.getPlaylistId()),this.playerAdapter.isShuffledPlaylist()&&(i.shuffled=1)),n&&(i.track_code=n),this.playerAdapter.isRepeatCurrentAudio()?i.repeat="one":this.playerAdapter.isRepeatAll()&&(i.repeat="all"),this.playerAdapter.isAutoPlayed()&&(i.auto=1),this.playerAdapter.hasPrevAudio()&&(i.prev_audio_id=this.playerAdapter.getPrevAudioId()),this.playerAdapter.hasPrevPlaylist()&&this.playerAdapter.isRealPrevPlaylist()&&(i.prev_playlist_id=this.playerAdapter.getPrevPlaylistId()),this.playerAdapter.isPlaying()||(i.end_stream_reason="stop_btn"),i.state=document.hidden?"background":"app",this.listenedData=i,this.sendListenedDataDelayed(1e4,i),i}}}sendListenedData(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;clearTimeout(this.sendTimeout);var t=e||this.listenedData;this.listenedData=null,t&&t.listened&&(this.uniqueUserId&&(t.unique_id=this.uniqueUserId),this.playerAdapter.sendListenedData(t))}sendListenedDataDelayed(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;clearTimeout(this.sendTimeout),this.sendTimeout=setTimeout((()=>this.sendListenedData(t)),e)}serializeEvent(e){var t=[N[e.type],B[e.subtype],1];return e.audioId?t.push(e.ownerId+"_"+e.audioId):t.push(0),e.trackCode?t.push(e.trackCode):t.push(0),e.state?t.push(e.state):t.push(r.UNKNOWN_STATE),e.ref?t.push(e.ref):t.push(""),e.context?t.push(e.context):t.push("other"),e.volume||0===e.volume?t.push(e.volume):t.push(this.playerAdapter.getVolume()),e.position||0===e.position?t.push(e.position):t.push(this.playerAdapter.getProgressInSeconds()),e.shuffle?t.push(e.shuffle?1:0):t.push(0),e.repeat?t.push(e.repeat):t.push(0),e.listened?t.push(Math.max(e.listened,0)):t.push(0),e.playlistId?t.push(e.playlistId):t.push(""),e.targetOwnerId?t.push(e.targetOwnerId):t.push(0),this.uniqueUserId?t.push(this.uniqueUserId):t.push(""),e.positionTo?t.push(e.positionTo):t.push(null),t}sendEvent(e){this.debug&&(console.log("audio stats event",e.type,e.subtype,e),window._statForTest||(window._statForTest=[]),window._statForTest.push(e)),(0,i.statlogsValueEvent)("audio_sts",...this.serializeEvent(e))}sendCurrentAudioEvent(e){this.sendEvent(c({shuffle:this.playerAdapter.isShuffledPlaylist(),repeat:this.playerAdapter.isRepeatCurrentAudio()?1:this.playerAdapter.isRepeatAll()?2:0,volume:this.playerAdapter.getVolume(),position:this.playerAdapter.getProgressInSeconds(),listened:this.getListenedTime(),playlistId:this.playerAdapter.getPlaylistId()},this.getEnvParams(),{},this.getCurrentAudioParams(),{},e))}sendAudioEvent(e){var t=c({},e,{},this.getEnvParams());!vk.id&&this.uniqueUserId&&(t.uniqueUnauthId=this.uniqueUserId),this.sendEvent(t)}destroy(){this.playerAdapter.unListenAll(),this.stopListenOnBeforeUnload(),this.playerAdapter=null,this.listenedData=null,clearTimeout(this.sendTimeout)}}},343860:(e,t,n)=>{"use strict";n.d(t,{UNKNOWN_STATE:()=>o,FULL_SCREEN_STATE:()=>i,AudioStatsPlayerAdapter:()=>a});var r=n(200134),o=0,i=2;class a{constructor(e){this.player=e,this.listeners=[]}listen(e,t,n){var r=t.bind(n||this);this.listeners.push({event:e,fn:t,listener:r}),this.playerListen(e,r)}unListen(e,t){var n=-1;if(each(this.listeners,((r,o)=>{if(o.event===e&&o.listener===t)return n=r,!1})),!(n<0)){var r=this.listeners[n];this.playerUnListen(e,r.listener),this.listeners.splice(n,1)}}unListenAll(){for(var e;e=this.listeners[0];)this.unListen(e.event,e.listener)}listenPlay(e,t){this.listen(r.events.PLAY,e,t)}listenPause(e,t){this.listen(r.events.PAUSE,e,t)}listenStop(e,t){this.listen("stop",e,t)}listenProgress(e,t){this.listen(r.events.PROGRESS,e,t)}listenVolume(e,t){this.listen(r.events.VOLUME,e,t)}listenSeek(e,t){this.listen(r.events.SEEK,e,t)}listenPlaylistChanged(e,t){this.listen(r.events.PLAYLIST_CHANGED,e,t)}listenEnded(e,t){this.listen(r.events.ENDED,e,t)}listenPlayNext(e,t){this.listen(r.events.PLAY_NEXT,e,t)}listenAdCompleted(e,t){this.listen(r.events.AD_COMPLETED,e,t)}playerListen(e,t){this.player.subscribe(e,t)}playerUnListen(e,t){this.player.unsubscribe(e,t)}getPausedBy(){return null}getState(){return document.hidden?1:3}getProgress(){return this.player.playerGetProgress()}getProgressInSeconds(){return this.player.getProgressInSeconds()}getVolume(){return this.player.getVolume()}getAudioId(){return this.player.getAudioId()}getAudio(){return this.player.getAudio()}getAudioTrackCode(){return this.player.getAudioTrackCode()}getPrevAudioId(){return this.player.getPrevAudioId()}getPrevPlaylistId(){return this.player.getPrevPlaylistId()}getPlaylistId(){return this.player.getPlaylistId()}getContext(){return this.player.getContext()}getSequence(){return this.player.getSequence()}getType(){return this.player.getType()}getListenedTime(){return isNaN(this.player.getListenedTime())?0:Math.round(this.player.getListenedTime())}getSearchParams(){return this.player.getSearchParams()}isPlaying(){return this.player.isPlaying()}isAutoPlayed(){return this.player.isAutoPlayed()}isRepeatCurrentAudio(){return this.player.isRepeatCurrentAudio()}isRepeatAll(){return this.player.isRepeatAll()}isShuffledPlaylist(){return this.player.isShuffledPlaylist()}isRealPlaylist(){return this.player.isRealPlaylist()}isRealPrevPlaylist(){return this.player.isRealPrevPlaylist()}isPodcast(){return this.player.isPodcast()}isArticleTts(){return this.player.isArticleTts()}isAdPlaying(){return this.player.ads.isPlaying()}isLastTrack(){return this.player.isLastTrack()}hasPrevAudio(){return this.player.hasPrevAudio()}hasPrevPlaylist(){return this.player.hasPrevPlaylist()}hasPlaylist(){return this.player.hasPlaylist()}hasSearchParams(){return this.player.hasSearchParams()}isDebug(){return!1}sendListenedData(e){return this.player.sendListenedData(e)}}},471323:(e,t,n)=>{"use strict";n.d(t,{SILENCE:()=>r,DEFAULT_VOLUME:()=>o});var r="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA",o=.4761515102104643},820587:(e,t,n)=>{"use strict";n.d(t,{AUDIO_PLAYER_ENUMS:()=>r});var r={AUDIO_ITEM_INDEX_ID:0,AUDIO_ITEM_INDEX_OWNER_ID:1,AUDIO_ITEM_INDEX_URL:2,AUDIO_ITEM_INDEX_TITLE:3,AUDIO_ITEM_INDEX_PERFORMER:4,AUDIO_ITEM_INDEX_DURATION:5,AUDIO_ITEM_INDEX_ALBUM_ID:6,AUDIO_ITEM_INDEX_AUTHOR_LINK:8,AUDIO_ITEM_INDEX_LYRICS:9,AUDIO_ITEM_INDEX_FLAGS:10,AUDIO_ITEM_INDEX_CONTEXT:11,AUDIO_ITEM_INDEX_EXTRA:12,AUDIO_ITEM_INDEX_HASHES:13,AUDIO_ITEM_INDEX_COVER_URL:14,AUDIO_ITEM_INDEX_ADS:15,AUDIO_ITEM_INDEX_SUBTITLE:16,AUDIO_ITEM_INDEX_MAIN_ARTISTS:17,AUDIO_ITEM_INDEX_FEAT_ARTISTS:18,AUDIO_ITEM_INDEX_ALBUM:19,AUDIO_ITEM_INDEX_TRACK_CODE:20,AUDIO_ITEM_INDEX_RESTRICTION:21,AUDIO_ITEM_INDEX_ALBUM_PART:22,AUDIO_ITEM_ACCESS_KEY:24,AUDIO_ITEM_CHART_INFO_INDEX:25,AUDIO_ITEM_INDEX_TRACK_PAGE_ID:26,AUDIO_ITEM_HAS_LYRICS_BIT:1,AUDIO_ITEM_CAN_ADD_BIT:2,AUDIO_ITEM_CLAIMED_BIT:4,AUDIO_ITEM_QUEUE_BIT:8,AUDIO_ITEM_HQ_BIT:16,AUDIO_ITEM_LONG_PERFORMER_BIT:32,AUDIO_ITEM_UMA_BIT:128,AUDIO_ITEM_REPLACEABLE:512,AUDIO_ITEM_EXPLICIT_BIT:1024,AUDIO_ENOUGH_LOCAL_SEARCH_RESULTS:500,AUDIO_RECOMS_TYPE_LISTENED:"recoms6",AUDIO_PLAYING_CLS:"audio_row__playing",AUDIO_CURRENT_CLS:"audio_row__current",AUDIO_DURATION_CLS:"audio_row__duration",AUDIO_LAYER_HEIGHT:550,AUDIO_LAYER_MIN_WIDTH:400,AUDIO_LAYER_MAX_WIDTH:1e3,AUDIO_HQ_LABEL_CLS:"audio_hq_label_show",AUDIO_MAX_AUDIOS_IN_SNIPPET:5,AUDIO_ROW_COVER_SIZE:40,AUDIO_ROW_PLAY_SIZE:24,AUDIO_ROW_ACTION_ROW_ITEM:'<button class="audio_row__more_action audio_row__more_action_%0% _audio_row__more_action_%0% %3%">%2%</button>',LOG_LS_KEY:"audiolog"}},120290:(e,t,n)=>{"use strict";n.d(t,{asObject:()=>i});n(751876);var r=n(820587),o=n(844900);function i(e){if(!e)return null;if(isObject(e))return e;if("string"==typeof e)return{id:e};var t=(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_HASHES]||"").split("/"),n=(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_COVER_URL]||"").split(","),i=(0,o.getAudioPerformers)(e,!1);return{id:intval(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ID]),owner_id:intval(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID]),ownerId:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID],fullId:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID]+"_"+e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ID],title:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_TITLE]||"",subTitle:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_SUBTITLE],performer:i,mainArtists:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_MAIN_ARTISTS],featArtists:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FEAT_ARTISTS],authorLink:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_AUTHOR_LINK],duration:intval(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_DURATION]),lyrics:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_LYRICS]||"",url:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_URL],flags:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS],context:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_CONTEXT],extra:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA],accessKey:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_ACCESS_KEY],addHash:t[0]||"",editHash:t[1]||"",actionHash:t[2]||"",deleteHash:t[3]||"",replaceHash:t[4]||"",urlHash:t[5]||"",restoreHash:t[6]||"",canEdit:!!t[1],canDelete:!!t[3],isLongPerformer:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_LONG_PERFORMER_BIT,canAdd:!!(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_CAN_ADD_BIT),coverUrl_s:n[0],coverUrl_p:n[1],hasTrackPage:!!e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_TRACK_PAGE_ID],trackPageId:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_TRACK_PAGE_ID],isClaimed:!!(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_CLAIMED_BIT),isFromQueue:!!(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_QUEUE_BIT),isExplicit:!!(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_EXPLICIT_BIT),isUMA:!!(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_UMA_BIT),isReplaceable:!!(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]&r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_REPLACEABLE),ads:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ADS],album:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM],albumId:intval(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM_ID]),albumPart:intval(e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM_PART]),trackCode:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_TRACK_CODE],restrictionStatus:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_RESTRICTION],chartInfo:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_CHART_INFO_INDEX]}}},366792:(e,t,n)=>{"use strict";n.d(t,{audioUnmaskSource:()=>i});n(751876);var r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN0PQRSTUVWXYZO123456789+/=",o={v:function(e){return e.split("").reverse().join("")},r:function(e,t){var n;e=e.split("");for(var o=r+r,i=e.length;i--;)~(n=o.indexOf(e[i]))&&(e[i]=o.substr(n-t,1));return e.join("")},s:function(e,t){var n=e.length;if(n){var r=function(e,t){var n=e.length,r=[];if(n){var o=n;for(t=Math.abs(t);o--;)t=(n*(o+1)^t+o)%n,r[o]=t}return r}(e,t),o=0;for(e=e.split("");++o<n;)e[o]=e.splice(r[n-1-o],1,e[o])[0];e=e.join("")}return e},i:function(e,t){return o.s(e,t^vk.id)},x:function(e,t){var n=[];return t=t.charCodeAt(0),each(e.split(""),(function(e,r){n.push(String.fromCharCode(r.charCodeAt(0)^t))})),n.join("")}};function i(e){if((!window.wbopen||!~(window.open+"").indexOf("wbopen"))&&~e.indexOf("audio_api_unavailable")){var t,n,r=e.split("?extra=")[1].split("#"),i=""===r[1]?"":a(r[1]);if(r=a(r[0]),"string"!=typeof i||!r)return e;for(var s=(i=i?i.split(String.fromCharCode(9)):[]).length;s--;){if(t=(n=i[s].split(String.fromCharCode(11))).splice(0,1,r)[0],!o[t])return e;r=o[t].apply(null,n)}if(r&&"http"===r.substr(0,4))return r}return e}function a(e){if(!e||e.length%4==1)return!1;for(var t,n,o=0,i=0,a="";n=e.charAt(i++);)~(n=r.indexOf(n))&&(t=o%4?64*t+n:n,o++%4)&&(a+=String.fromCharCode(255&t>>(-2*o&6)));return a}},597970:(e,t,n)=>{"use strict";function r(e,t){var n="";return e.forEach((function(r,o){var i="/audio?performer=1&q="+encodeURIComponent(r.name),a=window.getWebHost?window.getWebHost():"";r.id&&(i=`/artist/${r.id}`),n+=t?`<a class="artist_link" href="${a}${i}">${r.name}</a>`:r.name,o<e.length-1&&(n+=", ")})),n}n.d(t,{getAudioArtistsString:()=>r})},844900:(e,t,n)=>{"use strict";n.d(t,{getAudioPerformers:()=>a});n(59357);var r=n(12733),o=n(597970),i=n(820587);function a(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="",a=!(0,r.isPodcast)(e)&&t;if(isArray(e[i.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_MAIN_ARTISTS])&&(n=(0,o.getAudioArtistsString)(e[i.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_MAIN_ARTISTS],a)),isArray(e[i.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FEAT_ARTISTS])&&(n+=" feat. ",n+=(0,o.getAudioArtistsString)(e[i.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FEAT_ARTISTS],a)),!n){var s=e[i.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_PERFORMER]?e[i.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_PERFORMER].replace(/<\/?em>/g,""):"";if(a){var c="/audio?performer=1&q="+encodeURIComponent(s);n=`<a class="artist_link" data-performer="${s}" href="${c}">${s}</a>`}else n=s}return n}},73665:(e,t,n)=>{"use strict";n.d(t,{getCurrentAudio:()=>o});var r=n(120290);function o(){try{return window.isMVK?window.audio.getCurrent():(0,r.asObject)(window.getAudioPlayer().getCurrentAudio())}catch(e){return{id:0,ownerId:0}}}},849115:(e,t,n)=>{"use strict";n.d(t,{isArticleTts:()=>o});var r=n(820587);function o(e){if(!e)return!1;var t=isObject(e)?e.extra:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA];return isObject(t)||(t=JSON.parse(t||"{}")),!!t.articleTts}},12733:(e,t,n)=>{"use strict";n.d(t,{isPodcast:()=>o});var r=n(820587);function o(e){if(!e)return!1;var t=isObject(e)?e.extra:e[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA];return isObject(t)||(t=JSON.parse(t||"{}")),!!t.podcast}},893301:(e,t,n)=>{"use strict";n.d(t,{serializeAudio:()=>o});n(176774);var r=n(820587);function o(e){if(!e)return null;if(Array.isArray(e))return e;var t=[e.addHash,e.editHash,e.actionHash,e.deleteHash,e.replaceHash,e.urlHash,e.restoreHash].join("/"),n=[e.coverUrl_s,e.coverUrl_p].join(","),o=[];return o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ID]=e.id,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_OWNER_ID]=e.owner_id,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_URL]=e.url,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_TITLE]=e.title,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_PERFORMER]=e.performer,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_DURATION]=e.duration,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM_ID]=e.albumId,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_AUTHOR_LINK]=e.authorLink,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_LYRICS]=e.lyrics,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FLAGS]=e.flags,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_CONTEXT]=e.context,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_EXTRA]=e.extra,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_HASHES]=t,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_COVER_URL]=n,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ADS]=e.ads,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_SUBTITLE]=e.subTitle,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_MAIN_ARTISTS]=e.mainArtists,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_FEAT_ARTISTS]=e.featArtists,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM]=e.album,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_TRACK_CODE]=e.trackCode,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_RESTRICTION]=e.restrictionStatus,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_INDEX_ALBUM_PART]=e.albumPart,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_ACCESS_KEY]=e.accessKey,o[r.AUDIO_PLAYER_ENUMS.AUDIO_ITEM_CHART_INFO_INDEX]=e.chartInfo,o}},804333:(e,t,n)=>{"use strict";function r(e,t){if(!window.Worker||!window.Blob)return setTimeout(e,t);var n=new Blob([`\n      var timeout;\n      onmessage = function(e) {\n        clearTimeout(timeout);\n        if (e.data == 'start') {\n          timeout = setTimeout(function() { postMessage({}); }, ${t});\n        }\n      }\n    `]);try{var r=new Worker(window.URL.createObjectURL(n));return r.onmessage=function(){r.terminate(),e()},r.postMessage("start"),r}catch(n){return setTimeout(e,t)}}n.d(t,{setWorkerTimeout:()=>r})},602227:(e,t,n)=>{"use strict";n.d(t,{wrapAudioPlay:()=>r});n(940851),n(296253);function r(e){try{return e.play()||Promise.resolve()}catch(e){return Promise.reject(e)}}},80842:(e,t,n)=>{"use strict";n.d(t,{GROUPS_ADMIN_LEVEL_USER:()=>r,GROUPS_ADMIN_LEVEL_ADMINISTRATOR:()=>o,USER_META_FIELD_IS_DONUT_PAID_MEMBER:()=>i,default:()=>a,GROUPS_CLASS_EVENT:()=>s});var r=0,o=3,i="is_donut_paid_member";const a={GROUPS_ADMIN_LEVEL_USER:r,GROUPS_ADMIN_LEVEL_MODERATOR:1,GROUPS_ADMIN_LEVEL_EDITOR:2,GROUPS_ADMIN_LEVEL_ADMINISTRATOR:o,GROUPS_ADMIN_LEVEL_HOST:4,GROUPS_ADMIN_LEVEL_EVENT_CREATOR:5,GROUPS_ADMIN_LEVEL_CREATOR:6,GROUPS_ADMIN_PSEUDO_LEVEL_ADVERTISER:100,GROUPS_ADMIN_FLAG_ADS:8};var s=2},889029:(e,t,n)=>{"use strict";n.d(t,{gemiusTrackPage:()=>o});var r=n(19331);function o(){if((0,r.partConfigEnabled)("geminus_counter")){var e="pzBAVLtpzyiyDVIwmwjmX5a2zSVdA6eUI7mpf0ufDFf.57";if(window.pp_gemius_identifier)window.pp_gemius_hit(e);else{window.pp_gemius_identifier=e;var t=function(e){window[e]=window[e]||function(){var t=window[e+"_pdata"]=window[e+"_pdata"]||[];t[t.length]=arguments}};t("gemius_hit"),t("gemius_event"),t("pp_gemius_hit"),t("pp_gemius_event"),function(e,t){try{var n=e.createElement(t),r=e.getElementsByTagName(t)[0],o="http"+("https:"==location.protocol?"s":""),i="vkgalv";if(window.vk&&window.vk.countryISO)switch(window.vk.countryISO){case"BY":i="vkgaby";break;case"MD":i="vkgamd";break;case"EE":i="vkgaee"}n.setAttribute("async","async"),n.setAttribute("defer","defer"),n.src=o+"://"+i+".hit.gemius.pl/xgemius.js",r.parentNode.insertBefore(n,r)}catch(e){}}(document,"script")}}}},328396:(e,t,n)=>{"use strict";n.d(t,{mediascopeTrackPage:()=>c});n(530522),n(66108),n(296253),n(991181),n(579665),n(95767),n(283946),n(59357),n(751876);var r=n(40906),o=n(479957),i=n(19331);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n=location.protocol,s=`^https?:\\/\\/(?:(?:www|m)\\.)?(?:\\w+\\.)*${(0,r.escapeRE)("vk.com")}`,c=window._tns&&(window._tns.tnsPixelSocdem||"83"),l=t.replace(/\*/g,"%2a").split("#")[0],u=window._tns&&window._tns.tnsPixelType;if((0,r.vkImage)().src=`${n}//www.tns-counter.ru/V13a**clid:${c}*${l}*vk_com/ru/UTF-8/tmsec=vksite_total/${Math.round(1e9*Math.random())}`,(0,i.partConfigEnabled)("tns_track_sections")){var d="content",_="photo",p="music",h="video",f="clips",m="ecomm",v="games",g="docs",y=[...[[/w=story-?\d+_\d+/,d,"story"],[/z=video-?\d+_\d+/,h,"videoview"],[/z=(photo(_tag)?-?\d+_\d+|albums?-?\d+)/,_,"photoview"],[/z=audio_playlist-?\d+_\d+/,p,"playlistview"],[/z=podcast-?\d+_\d+/,p,"podcastview"],[/z=clip-?\d+_\d+/,f,"clipsview"],[/w=app\d+/,v,"gamesappview"],[/w=product-?\d+_\d+/,m,"product"]].map((e=>{var t=a(e,3),n=t[0],r=t[1],o=t[2];return[new RegExp(s+"\\b.*?\\b"+n.source),r,o]})),...[[/feed\?section=likes(\/|\&|$)/,d,"likes"],[/feed(\/|\?|$)/,d,"feed"],[/friends(\/|\?|$)/,d,"friends"],[/groups(\/|\?|$)/,d,"groups"],[/(id|public|club)\d+(\/|\?|$)/,d,"idpublicclub"],[/@[\w-\.]+(\/|\?|$)/,d,"longread"],[/bookmarks(\/|\?|$)/,d,"bookmarks"],[/stickers(\/|\?|$)/,d,"stickers"],[/im(\/|\?|$)/,"messenger","messenger"],[/(photos|tag\d+|(albums|photos)-?\d+|(album|photo)-?\d+_\d+)(\/|\?|$)/,_,"photo"],[/(audio(s-?\d+)?|music)(\/|\?|$)/,p,"music"],[/podcasts(-?\d+)(\/|\?|$)/,"podcasts","podcasts"],[/(videos-?\d+|video(-?\d+_\d+)?)(\/|\?|$)/,h,"video"],[/(clips(-?\d+)?|clip-?\d+_\d+)(\/|\?|$)/,f,"clips"],[/services(\/|\?|$)/,"services","services"],[/taxi(\/|\?|$)/,"taxi","taxi"],[/eda(\/|\?|$)/,"eda","eda"],[/worki(\/|\?|$)/,"worki","worki"],[/market(-?\d+)?(\/|\?|$)/,m,"ecomm"],[/apps(\/|\?|$)/,v,"gamesapp"],[/app\d+(_-?\d+)(\/|\?|$)/,v,"gamesapppage"],[/docs(\/|\?|$)/,g,"docs"],[/doc-?\d+_\d+(\/|\?|$)/,g,"docdoc"]].map((e=>{var t=a(e,3),n=t[0],r=t[1],o=t[2];return[new RegExp(s+"\\/"+n.source),r,o]}))],E=window.cur&&window.cur.module||"other",w="other",b="other";y.some((t=>{if(t[0].test(e))return w=t[1],b=t[2],!0})),(0,o.statlogsValueEvent)("counters_check_tns",w,b,E)}"unauth"===u?(0,r.vkImage)().src=n+"//www.tns-counter.ru/V13a****vk_ad/ru/UTF-8/tmsec=vkad_cid1015708-posid1184674/"+Math.round(1e9*Math.random()):"has_rough"===u?(0,r.vkImage)().src=n+"//www.tns-counter.ru/V13a****vk_ad/ru/UTF-8/tmsec=vkad_cid1015708-posid1184675/"+Math.round(1e9*Math.random()):"not_has_rough"===u&&((0,r.vkImage)().src=n+"//www.tns-counter.ru/V13a****vk_ad/ru/UTF-8/tmsec=vkad_cid1015708-posid1184677/"+Math.round(1e9*Math.random())),(0,i.partConfigEnabled)("tns_track_hosts")&&((0,r.vkImage)().src=`https://${function(){if(window.cur&&window.cur.module&&(0,r.isString)(window.cur.module)){var e=window.cur.module.trim().toLowerCase().replace(/[^a-z0-9_-]/g,"");if(e)return e}return"unknown"}()}.tns.vk-portal.net?v=${Math.round(1e9*Math.random())}`)}},337668:(e,t,n)=>{"use strict";n.d(t,{tmrTrackPage:()=>p,tmrTrackRegistration:()=>h,tmrTrackCustomGoal:()=>f,tmrTrackMiniAppOpen:()=>b,tmrTrackMiniAppClose:()=>C,tmrTrackMiniAppLogin:()=>S,tmrTrackMiniAppRegistration:()=>T,tmrTrackMiniAppCustom:()=>A});n(175115);var r=n(376567),o=n(19331),i=n(479957);function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var s="2579437",c="remixtmr_login",l="miniAppEvent",u=["mt_registration","mt_login"];function d(){return window.vk&&window.vk.id?window.vk.id:0}function _(e){if(!(window.vk&&window.vk.zero||window.__dev)){if(e&&e.goal&&u.includes(e.goal)){if((0,o.partConfigEnabled)("mt_log_disable"))return;(0,i.statlogsValueEvent)("counters_check_tmr",e.goal)}window._tmr=window._tmr||[],window._tmr.push(e)}}function p(e,t){_({id:s,url:e,referrer:t,type:"pageView",start:(new Date).getTime(),pid:d(),userid:d()}),(0,r.getCookie)(c)&&((0,r.setCookie)(c,"",-1),_({id:s,type:"reachGoal",goal:"mt_login",userid:d()}))}function h(){_({id:s,type:"reachGoal",goal:"mt_registration",userid:d()})}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_({id:s,type:"reachGoal",goal:e,userid:d(),params:t})}function m(e){var t=d();d&&_({id:s,type:l,params:a({},e,{platformUserId:String(t)})})}var v="open",g="close",y="login",E="registration",w="custom";function b(e,t){m({eventType:v,miniAppId:e,queryParams:t})}function C(e){m({eventType:g,miniAppId:e})}function S(e,t){m({eventType:y,miniAppId:e,customUserId:t})}function T(e,t){m({eventType:E,miniAppId:e,customUserId:t})}function A(e,t){m(a({eventType:w,miniAppId:e},t))}},533304:(e,t,n)=>{"use strict";n.d(t,{updateCounters:()=>l});n(530522),n(66108),n(296253),n(991181),n(579665),n(95767),n(59357);var r=n(889029),o=n(328396),i=n(337668),a=n(479957);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t){if(!(window.__dev||window.vk&&(window.vk.zero||window.vk.__dev))){t=t||document.referrer||"";[[/(hash|dl)=\w+/g,"$1="],[/(\/(?:write|mail|im|al_im.php))(?:\?[a-z0-9&=_-]*)?$/,"$1"],[/(\/write)\d*(?:\?[a-zA-Z0-9&=_-]*)?$/,"$1"]].forEach((n=>{var r=s(n,2),o=r[0],i=r[1];e=e.replace(o,i),t=t.replace(o,i)})),(0,i.tmrTrackPage)(e,t);var n=[/\/login\?.*$/];n.some((t=>t.test(e)))||n.some((e=>e.test(t)))||((0,o.mediascopeTrackPage)(e,t),(0,r.gemiusTrackPage)(),(0,a.statlogsValueEvent)("counters_check",1))}}},324816:(e,t,n)=>{"use strict";n.d(t,{emojiRegex:()=>r,skinToneModifierRegex:()=>o,EMOJI_PREFIXED_REPLACES:()=>i,EMOJI_REPLACES:()=>a,EMOJI_HINTS:()=>s});var r=()=>/(?:\uD83C\uDFF4)(?:(?:\uDB40\uDC67)(?:\uDB40\uDC62)(?:(?:\uDB40\uDC65)(?:\uDB40\uDC6E)(?:\uDB40\uDC67)|(?:\uDB40\uDC77)(?:\uDB40\uDC6C)(?:\uDB40\uDC73)|(?:\uDB40\uDC73)(?:\uDB40\uDC63)(?:\uDB40\uDC74))(?:\uDB40\uDC7F)|\u200D\u2620\uFE0F?)|(?:\uD83D\uDC69)\u200D(?:\uD83D\uDC69)\u200D(?:(?:\uD83D\uDC66)\u200D(?:\uD83D\uDC66)|(?:\uD83D\uDC67)\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83D\uDC68)(?:\u200D(?:\u2764\uFE0F?\u200D(?:(?:\uD83D\uDC8B)\u200D)?(?:\uD83D\uDC68)|(?:\uD83D[\uDC68\uDC69])\u200D(?:(?:\uD83D\uDC66)\u200D(?:\uD83D\uDC66)|(?:\uD83D\uDC67)\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83D\uDC66)\u200D(?:\uD83D\uDC66)|(?:\uD83D\uDC67)\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|(?:\uD83D\uDC69)\u200D(?:\u2764\uFE0F?\u200D(?:(?:\uD83D\uDC8B)\u200D(?:\uD83D[\uDC68\uDC69])|(?:\uD83D[\uDC68\uDC69]))|(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3]))|(?:\uD83D\uDC69)\u200D(?:\uD83D\uDC66)\u200D(?:\uD83D\uDC66)|(?:(?:\uD83D\uDC41)\uFE0F?\u200D(?:\uD83D\uDDE8)|(?:\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|(?:\uD83D\uDC68)(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F?|(?:\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]))\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|(?:\uD83D\uDC69)\u200D[\u2695\u2696\u2708])\uFE0F?|(?:\uD83D\uDC69)\u200D(?:\uD83D\uDC67)\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC69)\u200D(?:\uD83D\uDC69)\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC68)(?:\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC66\uDC67]))|(?:\uD83C[\uDFFB-\uDFFF]))|(?:\uD83C\uDFF3)\uFE0F?\u200D(?:\uD83C\uDF08)|(?:\uD83D\uDC69)\u200D(?:\uD83D\uDC67)|(?:\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDB0-\uDDB3])|(?:\uD83D\uDC69)\u200D(?:\uD83D\uDC66)|(?:\uD83C\uDDF6)(?:\uD83C\uDDE6)|(?:\uD83C\uDDFD)(?:\uD83C\uDDF0)|(?:\uD83C\uDDF4)(?:\uD83C\uDDF2)|(?:\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C\uDDED)(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|(?:\uD83C\uDDEC)(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|(?:\uD83C\uDDEA)(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|(?:\uD83C\uDDE8)(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\uD83C\uDDF2)(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|(?:\uD83C\uDDF3)(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|(?:\uD83C\uDDFC)(?:\uD83C[\uDDEB\uDDF8])|(?:\uD83C\uDDFA)(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|(?:\uD83C\uDDF0)(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|(?:\uD83C\uDDEF)(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C\uDDF8)(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|(?:\uD83C\uDDEE)(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|(?:\uD83C\uDDFF)(?:\uD83C[\uDDE6\uDDF2\uDDFC])|(?:\uD83C\uDDEB)(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|(?:\uD83C\uDDF5)(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|(?:\uD83C\uDDE9)(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|(?:\uD83C\uDDF9)(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|(?:\uD83C\uDDE7)(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|[#\*0-9]\uFE0F?\u20E3|(?:\uD83C\uDDF1)(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|(?:\uD83C\uDDE6)(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|(?:\uD83C\uDDF7)(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|(?:\uD83C\uDDFB)(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|(?:\uD83C\uDDFE)(?:\uD83C[\uDDEA\uDDF9])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])|(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF9]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD70\uDD73-\uDD76\uDD7A\uDD7C-\uDDA2\uDDB0-\uDDB9\uDDC0-\uDDC2\uDDD0-\uDDFF])\uFE0F?|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDD1-\uDDDD])/g,o=/\uFE0F?\uD83C[\uDFFB-\uDFFF]/,i={e29da4:/(\s|^)([0OО]:\))([\s\.,]|$)/g,f09f9887:/(\s|^)(;-\)+)([\s\.,]|$)/g,f09f9889:/(\s|^)([XХxх]-?D)([\s\.,]|$)/g,f09f9886:/(\s|^)(B-\))([\s\.,]|$)/g,f09f988e:/(\s|^)(3-\))([\s\.,]|$)/g,f09f988c:/(\s|^)(&gt;\()([\s\.,]|$)/g,f09f98a0:/(\s|^)(;[oоOО])([\s\.,]|$)/g,f09f98b0:/(\s|^)(8\|)([\s\.,]|$)/g,f09f98b3:/(\s|^)(8-?[oоOО])([\s\.,]|$)/g,f09f98b2:/(\s|^)(8-\))([\s\.,]|$)/g,f09f988d:/(\s|^)(:[XХ])([\s\.,]|$)/g,f09f98b7:/(\s|^)(:[oоOО])([\s\.,]|$)/g,f09f98a8:/(\s|^)(&lt;3)([\s\.,]|$)/g},a={f09f988a:/(:-\))([\s\.,]|$)/g,f09f9883:/(:-D)([\s\.,]|$)/g,f09f989c:/(;-[PР])([\s\.,]|$)/g,f09f988b:/(:-[pр])([\s\.,]|$)/g,f09f9892:/(:-\()([\s\.,]|$)/g,e298ba:/(:-?\])([\s\.,]|$)/g,f09f988f:/(;-\])([\s\.,]|$)/g,f09f9894:/(3-?\()([\s\.,]|$)/g,f09f98a2:/(:&#039;\()([\s\.,]|$)/g,f09f98ad:/(:_\()([\s\.,]|$)/g,f09f98a9:/(:\(\()([\s\.,]|$)/g,f09f9890:/(:\|)([\s\.,]|$)/g,f09f98a1:/(&gt;\(\()([\s\.,]|$)/g,f09f989a:/(:-\*)([\s\.,]|$)/g,f09f9888:/(\}:\))([\s\.,]|$)/g,f09f918d:/(:like:)([\s\.,]|$)/g,f09f918e:/(:dislike:)([\s\.,]|$)/g,e2989d:/(:up:)([\s\.,]|$)/g,e29c8c:/(:v:)([\s\.,]|$)/g,f09f918c:/(:ok:|:ок:)([\s\.,]|$)/g},s={e29da4:[0,"<3"],f09f988a:[1,":-)"],f09f9883:[2,":-D"],f09f9889:[3,";-)"],f09f9886:[4,"xD"],f09f989c:[5,";-P"],f09f988b:[6,":-p"],f09f988d:[7,"8-)"],f09f988e:[8,"B-)"],f09f9892:[9,":-("],f09f988f:[10,";-]"],f09f9894:[11,"3("],f09f98a2:[12,":'("],f09f98ad:[13,":_("],f09f98a9:[14,":(("],f09f98a8:[15,":o"],f09f9890:[16,":|"],f09f988c:[17,"3-)"],f09f98a0:[18,">("],f09f98a1:[19,">(("],f09f9887:[20,"O:)"],f09f98b0:[21,";o"],f09f98b3:[22,"8|"],f09f98b2:[23,"8o"],f09f98b7:[24,":X"],f09f989a:[25,":-*"],f09f9888:[26,"}:)"],f09f918d:[27,":like:"],f09f918e:[28,":dislike:"],e2989d:[29,":up:"],e29c8c:[30,":v:"],f09f918c:[31,":ok:"]}},898884:(e,t,n)=>{"use strict";n.d(t,{emojiToHTML:()=>a,getEmojiHTML:()=>s,emojiReplace:()=>c});n(991181),n(296253),n(59357);var r=n(324816),o=n(754259),i=n(449849);function a(e,t){if(browser.ipad||browser.iphone)return e;e=(e+"").replace(/&nbsp;/g," ").replace(/<br>/g,"\n");for(var n=0;n<2;n++)Object.keys(r.EMOJI_PREFIXED_REPLACES).forEach((t=>{e.replace(r.EMOJI_PREFIXED_REPLACES[t],((e,n,r,o)=>(n||"")+s(t)+(o||"")))}));return Object.keys(r.EMOJI_REPLACES).forEach((t=>{e=e.replace(r.EMOJI_REPLACES[t],((e,n,r)=>s(t)+(r||"")))})),e=e.replace(/\n/g,"<br>"),t&&(e=e.replace(/\uFE0F/g,"").replace((0,r.emojiRegex)(),c)),e}function s(e,t,n,r){return!n&&t?t:r?`<i class="emoji @${e}" emoji="${e}"${t?` title="${t}"`:""}></i>`:`<img class="emoji" src="/emoji/e/${e}${window.devicePixelRatio>=2?"_2x":""}.png"${t?` alt="${t}"`:""}${browser.msie&&Number(browser.version)>8?' contenteditable="false"':""}>`}function c(e){return s((0,o.emojiSymbolToByteHex)(e),(0,i.encodeHTMLEntities)(e),!0)}},754259:(e,t,n)=>{"use strict";n.d(t,{emojiSymbolToByteHex:()=>o,emojiByteHexToSymbol:()=>i,emojiRemoveSkinToneModifiers:()=>a});n(751876),n(59357);var r=n(324816);function o(e){return encodeURIComponent(e.replace(/\uFE0F/gi,"")).replace(/%/gi,"").toLowerCase()}function i(e){var t,n=e.length%2==1,r=n?e.slice(0,1):"",o=n?e.slice(1):e,i="";try{i=decodeURIComponent("%"+(t=o,t.split("").reduce(((e,t,n)=>e+t+((n+1)%2==0?" ":"")),"").trim().split(/\s+/)).join("%"))}catch(e){}return r+i}function a(e){return e.replace((0,r.emojiRegex)(),s)}function s(e){return e.replace(r.skinToneModifierRegex,"")}},449849:(e,t,n)=>{"use strict";n.d(t,{symbols:()=>i,escape:()=>a,encodeHTMLEntities:()=>s,decodeHTMLEntities:()=>c});n(530522),n(66108),n(296253),n(991181),n(579665),n(95767),n(283946),n(59357);function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i=[["&amp;","&"],["&lt;","<"],["&gt;",">"],["&quot;",'"']];function a(e){return i.reduce(((e,t)=>{var n=r(t,2),o=n[0],i=n[1];return e.replace(new RegExp(i,"ig"),o)}),e)}function s(e){return a(e).replace(/[\u00A0-\u9999<>\&]/gim,(e=>`&#${e.charCodeAt(0)};`))}function c(e){return i.reduce(((e,t)=>{var n=r(t,2),o=n[0],i=n[1];return e.replace(new RegExp(o,"ig"),i)}),e).replace(/&#(\d+);/g,((e,t)=>String.fromCodePoint(t)))}},765256:(e,t,n)=>{"use strict";n.d(t,{SAKIntegration:()=>o});n(976142),n(751876);var r=n(624823),o={isIntegrated:!1,origin:"",name:"",type:"",onMessage:new(n(761508).default),init(e){if(o.isIntegrated=!0,o.origin=function(e){var t=e.origin;if(!t)try{t=sessionStorage.getItem("_sak_embed_origin")}catch(e){}if(t)try{sessionStorage.setItem("_sak_embed_origin",t)}catch(e){}return t||""}(e),o.type=e.type,o.isNewMail=e.isNewMail,o._cleanUrl(),o.origin||window.parent!==window){var t=e.name||(o.isNewMail?"mvk_embedded_mail":"mvk_embedded_other");document.documentElement.style.setProperty("visibility","hidden","important"),o.name=t,o.embedded=new r.Embedded({name:t,target:window.parent,origin:o.origin,onMessage:(e,t)=>{o.onMessage.emit("embed",e,t),"click"===e&&o.doClick(t.selector)}}),o._ready=o.embedded.sendMessage("ready",{}).then((()=>{document.documentElement.classList.remove("vk_sak_embed_hidden"),document.documentElement.style.removeProperty("visibility")}))}else document.documentElement.classList.remove("vk_sak_embed_hidden")},sendMessage(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(o.isIntegrated)if(o._ready){if(!n||!o.name||o.name===n)return o._ready.then((()=>o.embedded.sendMessage(e,t)))}else console.error("SAKIntegration not ready")},doClick(e){if(e){var t=document.querySelector(e);t&&t.click()}},reauth:()=>o.embedded.sendMessage("sak:reauth",{}).catch((()=>({}))),_cleanUrl(){var e=location.search.slice(1).split("&").reduce(((e,t)=>(t.startsWith("_sak_embed")||e.push(t),e)),[]).join("&");history.replaceState(null,"",location.pathname+"?"+e+location.hash)}}},726271:(e,t,n)=>{"use strict";n.d(t,{browser:()=>d,mobPlatforms:()=>_,browserFeatures:()=>p,redirectToMVK:()=>h,initBrowserUtils:()=>f});n(530522),n(991181),n(579665),n(95767),n(66108),n(296253),n(175115),n(283946),n(59357),n(751876),n(21466);var r=n(555971),o=n(376567),i=n(668040),a=n(961540);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u=navigator.userAgent.toLowerCase(),d={version:(u.match(/.+(?:me|ox|on|rv|it|era|opr|ie|edge)[\/: ]([\d.]+)/)||[0,"0"])[1],opera:/opera/i.test(u)||/opr/i.test(u),vivaldi:/vivaldi/i.test(u),amigo:/amigo.*mrchrome soc/i.test(u),msie:/msie/i.test(u)&&!/opera/i.test(u)||/trident\//i.test(u)||/edge/i.test(u),msie6:/msie 6/i.test(u)&&!/opera/i.test(u),msie7:/msie 7/i.test(u)&&!/opera/i.test(u),msie8:/msie 8/i.test(u)&&!/opera/i.test(u),msie9:/msie 9/i.test(u)&&!/opera/i.test(u),msie_edge:/edge/i.test(u)&&!/opera/i.test(u),mozilla:/firefox/i.test(u),yabrowser:/yabrowser/i.test(u),whale:/whale/i.test(u),chrome:/chrome/i.test(u)&&!/edge/i.test(u),safari:!/chrome/i.test(u)&&/webkit|safari|khtml/i.test(u),iphone:/iphone/i.test(u),ipod:/ipod/i.test(u),iphone4:/iphone.*OS 4/i.test(u),ipod4:/ipod.*OS 4/i.test(u),ipad:/ipad/i.test(u),android:/android/i.test(u),bada:/bada/i.test(u),mobile:/iphone|ipod|ipad|opera mini|opera mobi|iemobile|android/i.test(u),msie_mobile:/iemobile/i.test(u),safari_mobile:/iphone|ipod|ipad/i.test(u),opera_mobile:/opera mini|opera mobi/i.test(u),opera_mini:/opera mini/i.test(u),mac:/mac/i.test(u),windows7:/windows nt 6.1/i.test(u),windowsVista:/windows nt 6.0/i.test(u),windowsXp:/windows nt (5.2|5.1)/i.test(u),search_bot:/(yandex|google|stackrambler|aport|slurp|msnbot|bingbot|twitterbot|ia_archiver|facebookexternalhit)/i.test(u),smart_tv:/smart-tv|smarttv/i.test(u)},_={1:1,2:1,3:1,4:1,5:1,8:1},p={wheelEvent:"onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":d.mozilla?"MozMousePixelScroll":"DOMMouseScroll",hasBoundingClientRect:"getBoundingClientRect"in document.createElement("div"),cmaEnabled:navigator.credentials&&navigator.credentials.preventSilentAccess&&window.vk&&vk.cma};function h(){var e,t=s(location.href.split("?"),2),n=t[0],r=t[1],o={},l=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=c(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}(new URLSearchParams(r));try{for(l.s();!(e=l.n()).done;){var u=e.value;o[u[0]]=u[1]}}catch(e){l.e(e)}finally{l.f()}if(o){if("1"===o.m)return;if(o.force_redirect_to_mvk){delete o.force_redirect_to_mvk;var d=(0,i.toQueryString)(o);return void(window.location=n.replace(a.VK_ORIGIN_REGEX_STRICT,"https://m."+(0,a.getHostName)())+(d?"?"+d:""))}}if(a.VK_URL_REGEX.test(n)&&!new RegExp("^"+a.VK_HOST_REGEX_UNSAFE.source+"\\/@").test(n)){var _=Object.assign(o,{force_redirect_to_mvk:1}),p=n+"?"+(0,i.toQueryString)(_);window.location=p}}function f(){(0,r.isIPadOS)(d)&&!(0,o.getCookie)("remixforce_full")&&h(),window._ua||(window._ua=navigator.userAgent.toLowerCase()),window.locDomain||(window.locDomain=location.host.toString().match(/[a-zA-Z]+\.[a-zA-Z]+\.?$/)[0]),window.locHost=location.host,window.locProtocol=location.protocol,window.locHash=location.hash.replace("#/","").replace("#!","")}},40906:(e,t,n)=>{"use strict";n.d(t,{rand:()=>o,replaceEntities:()=>v,isArray:()=>l,isEmpty:()=>d,isFunction:()=>a,isFormData:()=>s,isHttpHref:()=>C,isNumeric:()=>_,isObject:()=>u,isString:()=>c,isUndefined:()=>i,irand:()=>w,escapeAttr:()=>f,escapeRE:()=>p,escapeStr:()=>g,each:()=>A,htsc:()=>h,copy:()=>D,vkNow:()=>S,locBase:()=>r,unescapeAttr:()=>m,utf2win:()=>b,srand:()=>E,stripTags:()=>y,defaults:()=>P,intval:()=>T,vkImage:()=>O,isElement:()=>I});n(175115),n(751876),n(66108),n(296253),n(59357);var r=()=>location.toString().replace(/#.+$/,""),o=(e,t)=>Math.random()*(t-e+1)+e,i=e=>void 0===e,a=e=>e&&"[object Function]"===Object.prototype.toString.call(e),s=e=>e&&"[object FormData]"===Object.prototype.toString.call(e),c=e=>"string"==typeof e,l=e=>"[object Array]"===Object.prototype.toString.call(e),u=e=>"[object Object]"===Object.prototype.toString.call(e),d=e=>{if(!u(e))return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},_=e=>!isNaN(parseFloat(e))&&isFinite(e)&&!Array.isArray(e),p=e=>e?e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1"):"",h=e=>e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/\'/g,"&#39;").replace(/%/g,"&#37;"),f=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/\'/g,"&#39;"),m=e=>e.replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'"),v=e=>ce("textarea",{innerHTML:(e||"").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}).value,g=e=>e.replace(/\'/g,"\\'"),y=e=>e.replace(/<[^>]+>/g,""),E=()=>Math.random().toString(36).substr(2),w=(e,t)=>Math.floor(o(e,t)),b=e=>unescape(encodeURIComponent(e));function C(e){var t=(e+"").split(":"),n=t[1]&&t[0]?t[0]+":":location.protocol;return"http:"===n||"https:"===n}var S=()=>+new Date;function T(e){return!0===e?1:parseInt(e)||0}function A(e,t){if(!e)return e;if(u(e)||void 0===e.length){for(var n in e)if(e.hasOwnProperty(n)&&!1===t.call(e[n],n,e[n]))break}else for(var r=0,o=e.length;r<o;r++){var i=e[r];if(!1===t.call(i,r,i))break}return e}function D(e){return l(e)?e.concat([]):u(e)?extend({},e):e}var P=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return Object.assign({},e,...n.reverse(),e)},O=()=>window.Image?new Image:ce("img"),I=e=>"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName},22463:(e,t,n)=>{"use strict";n.d(t,{log:()=>i,error:()=>a});var r=n(19331);function o(){return window.console&&(0,r.partConfigEnabled)("js_console_logs")}function i(){o()&&window.console.log&&window.console.log(...arguments)}function a(){o()&&(window.console.error?window.console.error(...arguments):i(...arguments))}},668040:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromQueryString:()=>c,toQueryString:()=>s});n(751876),n(820075);var r=n(40906),o={},i=function(e){if(o[e])return e;try{return encodeURIComponent(e)}catch(e){return""}},a=function(e){try{return decodeURIComponent(e)}catch(t){return o[e]=1,e}};function s(e,t){var n=[];for(var o in e)if(e.hasOwnProperty(o)&&null!=e[o]&&!(0,r.isFunction)(e[o]))if((0,r.isArray)(e[o]))for(var a=0,s=0,c=e[o].length;a<c;++a)null==e[o][a]||(0,r.isFunction)(e[o][a])||(n.push(i(o)+"["+s+"]="+i(e[o][a])),++s);else n.push(i(o)+"="+i(e[o]));return t||n.sort(),n.join("&")}function c(e){if(!e)return{};var t={};return e=e.split("&"),(0,r.each)(e,(function(e,n){var r=n.split("=");if(r[0]){var o=a(r[1]+"");if("[]"===r[0].substr(r.length-2)){var i=a(r[0].substr(0,r.length-2));t[i]||(t[i]=[]),t[i].push(o)}else t[a(r[0])]=o}})),t}},376567:(e,t,n)=>{"use strict";n.d(t,{getCookie:()=>s,setCookie:()=>l,initCookies:()=>u});n(21466),n(751876);var r=n(19331),o=n(479957),i=n(66433);function a(){return browser.chrome&&parseInt(browser.version)>=71}function s(e){return function(){window._cookies={};for(var e=document.cookie.split(";"),t=/^[\s]*([^\s]+?)$/i,n=0,r=e.length;n<r;n++){var o=e[n].split("=");2===o.length&&(_cookies[o[0].match(t)[1]]=unescape(o[1].match(t)?o[1].match(t)[1]:""))}}(),"https:"!==location.protocol&&(0,o.statlogsValueEvent)("read_unsecure_cookie",e,location.href),_cookies[e]}function c(e,t){var n=(0,r.getCookieGroups)(),o=function(){var e=s("remixcpl");if(!e)return[];var t=e.split(",");return t.forEach(((e,n)=>{t[n]=parseInt(e)})),t}(),a=e,c=null;if(!(0,r.partConfigEnabled)("need_check_allowed_cookie"))return!0;if(!isNaN(parseInt(t))&&parseInt(t)<0)return!0;"remix"===a.substr(0,5)&&(a=a.substr(5)),n.hasOwnProperty(e)?c=parseInt(n[e]):n.hasOwnProperty(a)?c=parseInt(n[a]):"q_"===a.substr(0,2)&&n.hasOwnProperty("q_")&&(c=parseInt(n.q_)),(null===c||isNaN(c))&&(0,i.logError)(`Undefined cookie group for cookie ${e} (${a})`);return 1===c||!(isNaN(c)||!o.includes(c))}function l(e,t,n,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"None",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:window.locDomain,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};if(!c(e,n))return!1;var u=e+"="+escape(t),d=l.withoutSubdomains?".":"",_="; path=/"+(s?"; domain="+d+s:""),p="https:"===location.protocol,h=!!o;(0,r.partConfigEnabled)("cookie_secure_default_true")&&(h=!1!==o);var f=p&&h?"; secure":"",m=h&&a()&&(0,r.partConfigEnabled)("cookie_class_samesite")?`; SameSite=${i}`:"",v="";if(n){var g=new Date;g.setTime(g.getTime()+24*n*60*60*1e3),v="; expires="+g.toGMTString()}return document.cookie=u+v+_+m+f,!0}function u(){window._cookies={}}},256512:(e,t,n)=>{"use strict";n.d(t,{crc32:()=>s});n(183318);for(var r=new Uint32Array(256),o=256;o--;){for(var i=o,a=8;a--;)i=1&i?3988292384^i>>>1:i>>>1;r[o]=i}function s(e){for(var t=-1,n=0,o=e.length;n<o;n++)t=t>>>8^r[255&t^e[n]];return(-1^t)>>>0}},609720:(e,t,n)=>{"use strict";function r(e,t,n){var r;return function(){var o=arguments,i=()=>{r=null,n||e.apply(this,o)},a=n&&!r;clearTimeout(r),r=setTimeout(i,t),a&&e.apply(this,o)}}n.d(t,{debounce:()=>r})},555971:(e,t,n)=>{"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.browser;return!(!e.mac||e.iphone||e.ipad||e.ipod||!(navigator.maxTouchPoints>1))}n.d(t,{isIPadOS:()=>r,isDarkTheme:()=>o,isLightTheme:()=>i,isCSSVariablesSupported:()=>a,isMatchMediaSupported:()=>s,isFlexboxSupported:()=>c,isAutoSchemesSupported:()=>l,isSupportsSupported:()=>u,isGridsSupported:()=>d,isSVGSupported:()=>_,isIntersectionObserverSupported:()=>p,isJsModulesSupported:()=>h});var o=()=>Boolean(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches),i=()=>Boolean(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches),a=()=>Boolean(window.CSS&&CSS.supports&&CSS.supports("color","var(--custom-property)")),s=()=>Boolean(window.matchMedia),c=()=>document.documentElement.classList.contains("vk_flex_yes"),l=()=>Boolean(window.matchMedia&&window.matchMedia("(prefers-color-scheme)").matches),u=()=>Boolean(window.CSS&&CSS.supports),d=()=>Boolean("string"==typeof document.createElement("div").style.grid),_=()=>Boolean(document.createElementNS)&&Boolean(document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),p=()=>"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype,h=()=>!window.nomodules},761508:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var r=n(194795);window.EventEmitter=r;const o=r},495283:(e,t,n)=>{"use strict";n.d(t,{encodeHTMLEntities:()=>c,escape:()=>l,decodeHTMLEntities:()=>u,prepareToWriting:()=>d});n(530522),n(66108),n(296253),n(991181),n(579665),n(95767),n(283946),n(59357);var r=n(898884),o=n(449849);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=o.symbols,c=o.encodeHTMLEntities,l=o.escape;function u(e){return s.reduce(((e,t)=>{var n=i(t,2),r=n[0],o=n[1];return e.replace(new RegExp(r,"ig"),o)}),e).replace(/&#(\d+);/g,((e,t)=>String.fromCodePoint(t)))}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.lineBreak,o=void 0!==n&&n,i=t.convertEmoji,a=void 0===i||i,s=u(e);return s=s.replace(/\n\r/gi,"\n"),"oneline"===o?s=s.replace(/<br>/gi," ").replace(/\n/gi," "):"html"===o&&(s=s.replace(/\n/gi,"<br>")),s=l(s),a&&(s=(0,r.emojiToHTML)(s,!0)),s}},481117:(e,t,n)=>{"use strict";n.d(t,{rootId:()=>i,registerReactApplication:()=>a,showComponentInBox:()=>s,updateCurrentComponentInBox:()=>c,destroyComponentInBox:()=>l,renderCommonBox:()=>d});var r=n(973935),o=n(667294),i="react_root";function a(e,t){window.applicationInitFunctions[e]=t,window.reactInitQueue[e]&&window.reactInitQueue[e].length&&(window.reactInitQueue[e].forEach((t=>{window.initReactApplication(e,t)})),window.reactInitQueue[e]=[])}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.onDestroy||(t.onDestroy=l);var n=window.showFastBox(t),o=document.querySelectorAll(".box_layout"),i=o[o.length-1];return r.render(e,i),u(),n}function c(e){var t=document.querySelectorAll(".box_layout"),n=t[t.length-1];r.render(e,n)}function l(e){var t=document.querySelectorAll(".box_layout"),n=t[t.length-1];n&&r.unmountComponentAtNode(n);var o=window.curBox();o&&o.hide(e)}function u(){var e=document.querySelectorAll(".popup_box_container"),t=e[e.length-1];boxRefreshCoords(t)}function d(e,t,n){var r=n?o.createElement("div",{className:"box_controls ta_r"},n):null,i=n?"":" box_no_buttons";return o.createElement(o.Fragment,null,o.createElement("div",{className:"box_title_wrap"},o.createElement("div",{className:"box_x_button",role:"button",onClick:l}),o.createElement("div",{className:"box_title"},e)),o.createElement("div",{className:`box_body${i}`},t),r)}window.applicationInitFunctions||(window.applicationInitFunctions={}),window.reactInitQueue||(window.reactInitQueue={}),window.initReactApplication=(e,t)=>{window.applicationInitFunctions[e]?window.applicationInitFunctions[e](t):(window.reactInitQueue[e]||(window.reactInitQueue[e]=[]),window.reactInitQueue[e].push(t))}},26330:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});var r=n(522683);function o(e){try{r.vkLocalStorage.removeItem(e)}catch(e){}}const i={checkVersion:function(){try{return void 0!==window.localStorage&&null!==window.localStorage&&void 0!==window.JSON}catch(e){return!1}},remove:o,get:function(e){try{return JSON.parse(r.vkLocalStorage.getItem(e))}catch(e){return!1}},set:function(e,t){o(e);try{return r.vkLocalStorage.setItem(e,JSON.stringify(t))}catch(e){return!1}}}},760847:(e,t,n)=>{"use strict";function r(){return navigator.connection||navigator.mozConnection||navigator.webkitConnection}function o(){var e=r();return e&&e.type||"unknown"}function i(){var e=r();return e&&e.effectiveType||"unknown"}n.d(t,{default:()=>a});const a={getConnection:r,getConnectionType:o,getConnectionEffectiveType:i,getConnectionTypeID:function(){return{unknown:0,bluetooth:1,cellular:2,ethernet:3,none:4,wifi:5,wimax:6,other:7}[o()]||0},getConnectionEffectiveTypeID:function(){return{unknown:0,"slow-2g":1,"2g":2,"3g":3,"4g":4}[i()]||0}}},191040:(e,t,n)=>{"use strict";n.d(t,{pause:()=>r,retryFn:()=>o,debouncedPromise:()=>i,throttledPromise:()=>a,abortablePause:()=>s,promisify:()=>c});n(940851),n(296253);function r(e,t){return new Promise((n=>{setTimeout(n.bind(null,t),1e3*e)}))}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=0;return function i(){for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];return Promise.resolve().then((()=>e(...s))).catch((e=>{if(++o<=t){var a="function"==typeof n?n(o):0;return 0===a?i(...s):r(a).then((()=>i(...s)))}throw e}))}}function i(e,t,n){var r,o;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return new Promise(((e,i)=>{var s=n&&!r;clearTimeout(r),o&&o.reject("debounce"),r=setTimeout((function(){r=null,o=null,n||e(a)}),t),s?e(a):n&&i("debounce"),o={resolve:e,reject:i}})).then((t=>e(...t)))}}function a(e,t){var n,r,o;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return new Promise(((e,i)=>{var s=Date.now(),c=()=>{e(a),n=s};!n||n+t<s?c():(o&&(o.reject(),clearTimeout(r)),o={resolve:e,reject:i},r=setTimeout(c,t-(s-n)))})).then((t=>e(...t)))}}function s(e,t){var n,r=new Promise((r=>{n=r,setTimeout(r.bind(null,t),1e3*e)}));return{pause:()=>r,abort(){n(t)}}}function c(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new Promise((t=>e(...n,t)))}}},85372:(e,t,n)=>{"use strict";n.d(t,{CSS_LOAD_ERROR_TEXT:()=>r,loadStyle:()=>o,JS_LOAD_ERROR_TEXT:()=>a,loadScript:()=>s,addStyleSheetOldBrowser:()=>c,supportsOnload:()=>l});n(940851),n(296253);var r="Stylesheet load error for";function o(e){return new Promise(((t,n)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.href=e,o.onload=()=>t(o),o.onerror=()=>n(new Error(`${r} ${e}`)),document.head.appendChild(o)}))}var i,a="Script load error for";function s(e,t){var n=document.createElement("script");n.src=e,n.onload=()=>t(null,n),n.onerror=()=>t(new Error(`${a} ${e}`)),document.head.appendChild(n)}function c(e){var t,n=(t=e,new Promise(((e,n)=>{var r=new XMLHttpRequest;r.open("GET",t),r.onload=function(){200===r.status?e(r.response):n(r.response)},r.onerror=function(){n(r.response)},r.send()})));return n.then((e=>{var t=document.createElement("style");t.innerHTML=e,document.head.appendChild(t)})),n}function l(){if(void 0!==i)return i;var e="flex";try{var t=document.createElement("b");t.style.display=e,i=t.style.display===e}catch(e){i=!1}return i}},479957:(e,t,n)=>{"use strict";n.d(t,{statlogsValueEvent:()=>u});var r,o,i=n(376567),a=n(961540),s=n(40906),c=n(26330);(0,a.isMvk)()?(r="lock_m_stats_cookie_lock",o="remixmsts"):(r="lockkk_stats_cookie_lock",o="remixsts");var l=[];function u(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];var c;void 0!==e&&void 0!==t&&(l.forEach((n=>n(e,t,...r))),d((()=>{try{c=(c=JSON.parse((0,i.getCookie)(o))).data}catch(e){c=[]}c.push([Math.round(Date.now()/1e3),e,t].concat(r)),c=c.slice(-100);var n=Math.round((0,s.rand)(0,1e9));(0,i.setCookie)(o,JSON.stringify({data:c,uniqueId:n}),.01)})))}function d(e,t){if(c.default.checkVersion()){if(!0!==c.default.get(r)){c.default.set(r,!0);try{e()}catch(e){}return void c.default.set(r,!1)}t||setTimeout((()=>d(e,!0)),100)}else e()}},315893:(e,t,n)=>{"use strict";function r(e,t){var n,r,o=!1;return function i(){if(o)return n=arguments,void(r=this);e.apply(this,arguments),o=!0,setTimeout((function(){o=!1,n&&(i.apply(r,n),n=r=null)}),t)}}n.d(t,{throttle:()=>r})},550519:(e,t,n)=>{"use strict";n.d(t,{HAS_MEDIA_SESSION:()=>i,clear:()=>a,updateMediaSessionMetadata:()=>s});var r,o=n(471323),i=window&&window.navigator&&"mediaSession"in window.navigator&&"MediaMetadata"in window;function a(){i&&((r=r||document.createElement("audio")).src=o.SILENCE,r.play().then((()=>{})).catch((()=>{})))}function s(e){if(i){(location.hostname+e.album).length>30&&(e.album=e.album.substring(0,30-location.hostname.length)+"…");var t=navigator.mediaSession.metadata;t?(t.title=e.title,t.artist=e.artist,t.album=e.album,t.artwork=e.artwork):navigator.mediaSession.metadata=new MediaMetadata(e)}}},900421:(e,t,n)=>{"use strict";n.d(t,{urlBase64ToUint8Array:()=>r});n(446964),n(59357);function r(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=window.atob(t),r=new Uint8Array(n.length),o=0;o<n.length;++o)r[o]=n.charCodeAt(o);return r}},19331:(e,t,n)=>{"use strict";n.d(t,{randEnabled:()=>o,partConfigEnabled:()=>i,getCookieGroups:()=>a,calculateTimeOffsets:()=>s});var r=n(376567);function o(e){return Math.random()<e}function i(e){var t=(window.vk||{}).pe;return!!(void 0===t?{}:t)[e]}function a(){var e=(window.vk||{}).acl;return void 0===e?{}:e}function s(){var e=window.vk.ts;if(e&&!window.browser.opera_mobile){var t=new Date,n=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds())/1e3-e;n-=10800,n=(n/=60).toFixed(0),(n*=60)<-55800?n+=86400:n>37800&&(n-=86400);var o=0,i=Math.abs(n);[-12,-11,-10,-9.5,-9,-8,-7,-6,-5,-4.5,-4,-3.5,-3,-2,-1,0,1,2,3,3.5,4,4.5,5,5.5,5.75,6,6.5,7,8,8.75,9,9.5,10,10.5,11,12,12.75,13,14].forEach((e=>{var t=Math.round(3600*(e-3)),r=Math.abs(n-t);r<i&&(i=r,o=t)}));var a=(0,r.getCookie)("remixdt");return void 0!==a&&intval(a)===o||(0,r.setCookie)("remixdt",o,365),o}return 0}},213294:(e,t,n)=>{"use strict";n.d(t,{confirm:()=>a,hideBox:()=>s,showErrorBox:()=>c,ajax:()=>l,deepClone:()=>u,photoObjToSrc:()=>d});n(940851),n(296253);var r=n(654612),o=(n(483295),n(41650)),i=n(695724);function a(e,t){return new Promise(((n,i)=>{var a={title:e,onHide:i};return new r.MessageBox(a).content(t).setButtons((0,o.getLang)("global_yes"),n,(0,o.getLang)("global_cancel"),i).show()}))}function s(){var e=curBox();e&&e.hide()}function c(e){s(),(0,r.showFastBox)((0,o.getLang)("global_error"),e)}function l(e,t){return new Promise(((n,r)=>{window.ajax.post(e,t,{onDone:function(){n(...arguments)},onFail:function(){return r(...arguments),!0}})}))}function u(e){return(0,i.clone)(e,!0)}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"a",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"b";n=window.isRetina()?r:n;var o="";if(!e.sizes2&&!e.sizes)return o;var i=e.sizes2?e.sizes2:e.sizes,a=e.urls2?e.urls2:e.urls;if(!i||!i.length)return o;for(var s=0;s<i.length;s++){var c=i[s];if(c[0]===n)return t+a[s]}return o}},897213:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});n(751876);var r="idle",o="pend_rows",i="pend_prefetch",a="done_prefetch",s="done";class c{constructor(e,t){if(this.constructor!==c)throw new Error("AutoList: AutoList was called without 'new' operator");if(c._counter=c._counter||0,this._id=c._counter++,this.setListEl(e,t.scrollNode),this._opts=extend({threshold:0,renderImmediate:!1,fetchImmediate:!0},t),!this._containerEl)throw new Error("AutoList: container not found");this._rowClasses=!!this._opts.rowClass&&this._opts.rowClass.split(" "),delete this._opts.rowClass,this._initialRender=this._opts.renderImmediate,this._isProgressShown=!1,this._prefetched=[],this._initialRender?this._offset=0:this._opts.offset?this._offset=this._opts.offset:this._opts.rowClasses?this._offset=this._countRows(this._containerEl.children):this._offset=this._containerEl.children.length,this._page=this._offset>0?1:0,addEvent(this._scrollNode,"scroll",this._ev_scroll=this._onScroll.bind(this)),addEvent(window,"resize",this._ev_window_resize=this._onScroll.bind(this)),this._setState(this._opts.renderImmediate?o:i),this._opts.fetchImmediate?this._requestRows():(this._setState(r),this._onScroll())}getListEl(){return this._containerEl}setListEl(e,t){var n;this._containerEl=ge(e),this._scrollNode=t||c.closestOverflowParent(this._containerEl),n=this._scrollNode===window?0:getXY(this._scrollNode)[1],this._contentYOffset=getXY(this._containerEl)[1]-n}options(e){extend(this._opts,e)}_countRows(e){var t=this,n=0;return each(e,(function(e,r){"string"==typeof r&&(r=se(r)),t._rowClasses?each(t._rowClasses,(function(e,t){if(hasClass(r,t))return n++,!1})):n++})),n}_drawRows(e){var t=this;this._opts.drawRows?this._opts.drawRows(t._containerEl,e):each(e,(function(e,n){"string"==typeof n&&(n=se(trim(n))),n&&t._containerEl.appendChild(n)})),this.toggleProgress(this._state!==s),!this._forceDrawCalled&&this._opts.onRendered&&this._opts.onRendered(this._offset)}toggleProgress(e){e?!this._isProgressShown&&this._opts.showProgress&&this._opts.showProgress():this._isProgressShown&&this._opts.hideProgress&&this._opts.hideProgress(),this._isProgressShown=e}drawMore(){inArray(this._state,[r,a])?(this._forceDrawCalled=!0,this._drawRows(this._prefetched),this._setState(i),this._prefetched=[],this._requestRows(),this._forceDrawCalled=!1):this._state===s&&this._opts.onNoMore&&this._opts.onNoMore(this._containerEl.childElementCount)}destroy(){this._ev_scroll&&(removeEvent(this._scrollNode,"scroll",this._ev_scroll),this._ev_scroll=!1),this._ev_window_resize&&removeEvent(window,"resize",this._ev_window_resize),this._setState(s),this.toggleProgress(!1)}getOffset(){return this._offset}_requestRows(){if(!this.isDone()&&this._state!==a){function e(){this._opts.onNeedRows(this._onRowsProvided.bind(this),this._offset,this._page++,this._state===i,this)}this._initialRender=!1,e.apply(this)}}_onRowsProvided(e,t){if(!this.isDone()){if(!1===e)return this._requestRows();e=e||[],this._offset+=void 0===t?this._countRows(e):t;var n=this._containerEl.childElementCount;switch(this._state){case i:0===e.length?(this._setState(a),this._opts.onNoMore&&this._opts.onNoMore(n),0===this._prefetched.length&&this._setState(s)):(this._setState(r),this._prefetched=this._prefetched.concat(e),this._opts.onHasMore&&this._opts.onHasMore(),this._onScroll());break;case o:this._drawRows(e),0===e.length?(this._setState(s),this._opts.onNoMore&&this._opts.onNoMore(n)):(this._setState(i),this._requestRows()),this.toggleProgress(!1);break;case r:this._prefetched=this._prefetched.concat(e)}}}_setState(e){this._state=e}isDone(){return this._state===s}static closestOverflowParent(e){for(var t=e;t&&t.tagName&&("visible"===getStyle(t,"overflow")||"page_wrap"===t.id);)t=domPN(t);return t!==window.document&&t!==bodyNode&&t||(t=window),t}_onScroll(){if(!this._forceDrawCalled&&this._state!==o){var e,t,n=this._scrollNode;n===window?(t=Math.max(document.documentElement.clientHeight,window.innerHeight||0),e=scrollGetY()):(t=getSize(n)[1],e=this._scroll?this._scroll.data.scrollTop:n.scrollTop),t<10||this._containerEl.scrollHeight-t-e+this._contentYOffset<10&&(this._state===o||!this._prefetched.length&&this._state===i?(this.toggleProgress(!0),this._setState(o)):this._state===i||this._state===r?(this._drawRows(this._prefetched),this._prefetched=[],this._setState(i),this._requestRows()):this._state===a&&(this._drawRows(this._prefetched),this._prefetched=[],this._setState(s),this._opts.onNoMore&&this._opts.onNoMore(),this.destroy()))}}}},28238:(e,t,n)=>{"use strict";n.d(t,{RECENT_SEARCH_OP:()=>a,PIN_HIDDEN_ID_OP:()=>s,imDbGet:()=>l,mount:()=>_});n(530522),n(66108),n(296253),n(991181),n(579665),n(95767);var r=n(609720);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a="recent_search",s="pin_hide";function c(e){return"im_store_"+e}function l(e){return ls.get(c(e))||{}}function u(e,t,n){if(ls.checkVersion()){var r=JSON.stringify(t);rand(0,1e5)<=1&&statlogsValueEvent("im_local_store_size",r.length),n(c(e),r)}}function d(e,t,n){n.key===c(e)&&(t.db=JSON.parse(n.newValue),t.checkTime=Date.now())}function _(e){var t=(0,r.debounce)(((e,t)=>{localStorage.setItem(e,t)}),300);ls.checkVersion()&&function(e,t){for(var n=["fwd","draft","bind_attach"],r=l(e),o=!1,i=n.length;i--;)n[i]in r&&(delete r[n[i]],o=!0);o&&u(e,r,t)}(e,t);var n={db:l(e),checkTime:Date.now()},i=d.bind(null,e,n);return window.addEventListener("storage",i,!1),{select:(t,r)=>(Date.now()-n.checkTime>1e3&&(n.db=l(e)),function(e,t,n){return t===a?e[t]||[]:t===s?e[t]&&e[t][n]:e[t]?extend(!0,{},e[t][n]):null}(n.db,t,r)),selectByKey:t=>(Date.now()-n.checkTime>1e3&&(n.db=l(e)),n.db[t]),update(r,i){var c=function(e,t,n){switch(e[t]||(e[t]={}),t){case a:var r=n;r&&r.length>0?e[t]=r:delete e[t];break;case s:var i=o(n,2),c=i[0],l=i[1];l?e[t][c]=+l:delete e[t][c]}return e}(n.db,r,i);return n.db=c,n.checkTime=Date.now(),u(e,c,t)},updateByKey:(r,o)=>(n.db[r]=o,n.checkTime=Date.now(),u(e,n.db,t)),unmount(){window.removeEventListener("storage",i,!1)}}}},965030:(e,t,n)=>{"use strict";n.d(t,{Gifts:()=>l});n(175115);var r=n(386409),o=n(840774),i=n(291587),a=n(62816),s=n(467253);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}var l={deleteGift:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};window.ajax.post("al_gifts.php",{act:"delete",mid:r.mid,gift:n,hash:r.hash},{onDone:function(e){var n=ge("gift"+t);n&&(domNS(domFC(n))?domNS(domFC(n)).innerHTML=e:(n.appendChild(ce("div",{className:"gift_deleted",innerHTML:e})),hide(domFC(n)),window.Pagination&&!curBox()&&window.Pagination.recache(-1)))},showProgress:()=>{e.classList.add("gift_delete--loading"),e.innerHTML="",e.appendChild(ce("div",{className:"gift_delete__spinner",innerHTML:(0,a.getIcon16Spinner)().icon}))},hideProgress:()=>{e.classList.remove("gift_delete--loading"),e.innerHTML=(0,s.getIcon16Cancel)().icon}})},restoreGift:function(e,t,n,r){r=r||{},ajax.post("al_gifts.php",{act:"restore",mid:r.mid,gift:n,hash:r.hash},{onDone:function(){var e=ge("gift"+t);e&&domNS(domFC(e))&&(re(domNS(domFC(e))),show(domFC(e)))}})},markSpamGift:function(e,t,n,r){r=r||{},ajax.post("al_gifts.php",{act:"mark_spam",mid:r.mid,gift:n,hash:r.hash},{onDone:function(e){ge("gift_mark_spam"+t).innerHTML=e}})},initGiftsBox:function(e,t){e.setOptions({width:638,bodyStyle:"padding: 0",grey:!0,hideButtons:!0,onShow:function(){cur.gftbxWasScroll&&(boxLayerWrap.scrollTop=cur.gftbxWasScroll,cur.gftbxWasScroll=!1)}}),t.lang&&(cur.lang=extend(cur.lang||{},t.lang)),extend(cur,{gftbxOffset:t.offset,gftbxAutoload:!0,gftbxWasScroll:!1,gftbxMid:t.mid}),ajax.preload("al_gifts.php",{act:"box",mid:t.mid,offset:t.offset},t.preload),window.uiScrollBox&&window.uiScrollBox.init(e,{onShow:function(){addEvent(boxLayerWrap,"scroll",l.onGiftsScroll),setTimeout(cur.chooseAudioScroll,0)},onHide:function(){removeEvent(boxLayerWrap,"scroll",l.onGiftsScroll)}}),addEvent(boxLayerWrap,"scroll",l.onGiftsScroll);var n=boxLayerWrap.scrollTop;elfocus(geByClass1("_scroll_node",e.bodyNode)),boxLayerWrap.scrollTop=n,onBodyResize(),l.onGiftsScroll()},moreGifts:function(){var e=ge("gifts_more_link");(0,r.buttonLocked)(e)||(ajax.post("al_gifts.php",{act:"box",mid:cur.gftbxMid,offset:cur.gftbxOffset},{onDone:function(t,n,r){var o=ce("div",{innerHTML:t}),i=ge("gifts_rows");if(i){for(var a=domFC(o);a;a=domFC(o))i.appendChild(a);cur.gftbxOffset=n,r?l.preloadGifts():hide(e)}},showProgress:r.lockButton.pbind(e),hideProgress:r.unlockButton.pbind(e),cache:1}),cur.gftbxAutoload=!0)},preloadGifts:function(){ajax.post("al_gifts.php",{act:"box",mid:cur.gftbxMid,offset:cur.gftbxOffset},{cache:1})},onGiftsScroll:function(){if(cur.gftbxAutoload){var e=lastWindowHeight,t=ge("gifts_more_link");isVisible(t)&&e>getXY(t,!0)[1]&&t.click()}},showGiftBox:function(e,t,n){return window.Profile?window.Profile.showGiftBox(e,t,n):(cur.gftbxWasScroll=boxLayerWrap.scrollTop,boxLayerWrap.scrollTop=0,cur.viewAsBox?cur.viewAsBox():!showBox("al_gifts.php",{act:"get_gift_box",mid:e,fr:e==vk.id?1:0,ref:n},{stat:["gifts.css","wide_dd.js","wide_dd.css"],cache:1},t))},processBoxOptions(e,t){-1e3!=t&&t&&(extend(cur,{paymentsOfferPreview:t.paymentsOfferPreview,paymentsPreload:t.paymentsPreload,paymentsAppOrder:t.paymentsAppOrder,paymentsOfferPreload:t.paymentsOfferPreload}),t.orderData&&i.AppOrderBox.initialize(t.orderData.orderId,t.orderData.appId,t.orderData.testMode,t.orderData.hash,t.orderData.votes,t.orderData.discount,t.orderData.billPeriod),extend(cur,{paymentsAuthPayment:t.paymentsAuthPayment,paymentsOrderNotice:t.paymentsOrderNotice,paymentsTryCompleteOrder:t.paymentsTryCompleteOrder,isPaymentsAppOrder:t.isPaymentsAppOrder,paymentsOfferApp:t.paymentsOfferApp,checkoutEnabled:t.checkoutEnabled}),t.showProgress&&o.PaymentsBox.showProgress(""),extend(cur,{votesAmountsData:t.votesAmountsData,paymentsPreferVotes:t.paymentsPreferVotes,votesTypeInit:t.votesTypeInit,psList:t.psList,paymentsWideBox:t.paymentsWideBox,paymentsTooltips:t.paymentsTooltips,paymentsChangeType:0===t.paymentsWideBox?getLang("payments_go_change_pay_type"):"",payments_get_votes:getLang("payments_get_votes_new"),getVotesDoneHide:!0,paymentsWaitingCache:{},isPaymentComplete:!1,isPaymentAttemted:!1,usdRate:t.usdRate,paymentsHash:t.paymentsHash,paymentComplete:o.PaymentsBox.complete,paymentCanceled:o.PaymentsBox.paymentCanceled,paymentsShowProgress:o.PaymentsBox.showProgress,statSessionId:t.statSessionId}),o.PaymentsBox.initialize(e),cur.checkoutEnabled||(o.PaymentsBox.initPhoneCountry(t.countries,t.country),o.PaymentsBox.initPhoneNumber(ge("phone"))),extend(cur,{paymentsTypesSum:t.paymentsTypesSum,instantNeedCVV:t.instantNeedCVV,votesType:t.votesType,paymentsWPreload:t.paymentsWPreload}),t.getVotesAmountsOnDone&&o.PaymentsBox.getVotesAmountsOnDone.apply(this,cur.paymentsWPreload))},showGetMoneyBox(){return showBox("al_gifts.php",c({act:"get_money"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:null),{onDone:this.processBoxOptions})}}},49030:(e,t,n)=>{"use strict";function r(e){var t=e.getBoundingClientRect(),n=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||n.scrollTop,i=window.pageXOffset||r.scrollLeft||n.scrollLeft,a=r.clientTop||n.clientTop||0,s=r.clientLeft||n.clientLeft||0;return{top:Math.round(t.top+o-a),left:Math.round(t.left+i-s),width:e.offsetWidth,height:e.offsetHeight}}n.d(t,{default:()=>r})},215949:(e,t,n)=>{"use strict";n.r(t),n.d(t,{showQuickLoginBox:()=>h,showJoinBox:()=>f,Index:()=>m});n(59357);var r=n(289988),o=n(386409),i=n(654612),a=n(376852),s=n(786067),c=n(695724),l=n(315544),u=n(70488),d=n(255349),_=n(985048),p=n(559367);function h(){return showBox("al_login.php",{act:"box"}),!1}function f(){return showBox("join.php",{act:"box",from:window.nav.strLoc}),!1}var m={initNew:function(){(0,l.$$)(".index_login .big_text").forEach((e=>{placeholderInit(e)})),setTimeout((()=>elfocus("index_email")),0);var e=ge("index_login_form"),t=ge("index_email"),n=ge("index_pass");e.onsubmit=function(){if(!window.submitQuickLoginForm)return!0;if(!trim(t.value))return(0,o.notaBene)(t),!1;if(!trim(n.value))return(0,o.notaBene)(n),!1;var e=(0,_.isEmail)(t.value)?u.RegistrationItemEventTypes.INPUT_EMAIL:u.RegistrationItemEventTypes.INPUT_PHONE;return u.registrationItemStat.logEvent(e,cur.eventScreen,void 0,{force:!0}),submitQuickLoginForm(t.value,n.value,{prg:"index_login_button",params:{expire_input:val("index_expire_input")}}),!1},t.oninput=function(){m.isLoginInputDirty||(u.registrationItemStat.logEvent(u.RegistrationItemEventTypes.LOGIN_TAP,u.EventScreens.START,void 0,{force:!0}),m.isLoginInputDirty=!0)},n.oninput=function(){m.isPasswordInputDirty||(u.registrationItemStat.logEvent(u.RegistrationItemEventTypes.PASSWORD_TAP,u.EventScreens.START,void 0,{force:!0}),m.isPasswordInputDirty=!0)},window.loginByCredential&&(t.onclick=loginByCredential,n.onclick=loginByCredential),window.onReLoginDone=function(e){location.href=e},window.onReLoginFailed=function(e){-1===e&&(location.href=location.href.replace(/^http:/,"https:"))},(0,d.initVKComboIndexPromo)()},initVkId:function(e){var t=document.querySelector(".VkIdIndex");t&&(0,p.initVkIdForm)(t,e)},showRegTT:function(e,t){var n,r="INPUT"===e.tagName,i=e;(!r&&(n=geByClass1("selector_table",e))||!r&&(n=geByClass1("radiobtn",e)))&&(i=n);var s=function(){(0,a.showTooltip)(i,{text:t,dir:"right",width:320,typeClass:"ij_tt",shift:[335,-getSize(i)[1]/2],hasover:1,nohideover:1,onCreate:function(){removeEvent(i,"mouseout"),r&&(i.onblur=function(){i.tt&&i.tt.hide&&i.tt.hide()})}})};r?(e.onfocus=s,(0,o.notaBene)(e)):(s(),each(geByClass("selector_table",e),(function(e,t){(0,o.notaBene)(t)})))},showLoginBox:e=>(showBox("al_login.php",{act:"auth_box",ul:e},{params:{dark:!0,hideButtons:!0,bodyStyle:"padding: 44px 25px;"}}),!1),showQuickLoginBox:h,showJoinBox:f,deleteRecentAccount:function(e,t,n,r){return window.tooltips&&tooltips.hideAll(),ajax.post("/al_login.php?act=a_delete_recent_account",{mid:t,hash:n},{onDone:function(){re(gpeByClass("_row",e))}}),cancelEvent(r)},generateDays:function(e,t){for(var n=[[0,(0,s.getLang)("index_sel_bday")]],o=(0,r.getLastDay)(e,t),i=1;i<=o;++i)n.push([i,i+""]);return n},updateDays:function(e,t,n){n||(n=cur.uiBday),n.val()>(0,r.getLastDay)(e,t)&&n.clear(),n.setData(m.generateDays(e,t).slice((0,c.intval)(cur.options.bday)?1:0))},fbCheck:function(e,t,n){var r,o,i,a,s;window.fbAsyncInit=function(){FB.init({appId:e,xfbml:!0,version:"v2.7"});var r="_box"===t;n||(n=ge("index_fbcontinuewithsign"+(t||""))),setStyle(n,{opacity:0,height:0,overflow:"hidden"}),show(n),FB.Event.subscribe("xfbml.render",(()=>{animate(n,{height:r?79:55,opacity:1},200)}))},window.FB&&window.FB.init?window.fbAsyncInit():(r=document,o="script",i="facebook-jssdk",s=r.getElementsByTagName(o)[0],r.getElementById(i)||((a=r.createElement(o)).id=i,a.src="//connect.facebook.net/"+cur.fbLocale+"/sdk.js",s.parentNode.insertBefore(a,s)))},fbJoin:function(e,t){cur.fbContext=e,cur.fbLoginButton=t,u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.FACEBOOK_REGISTRATION,u.EventFieldValues.REGISTERED_VIA_FB),u.registrationItemStat.logEvent(u.RegistrationItemEventTypes.SCREEN_PROCEED,u.EventScreens.START,u.EventScreens.OAUTH_FB,{force:!0}),setCookie("remixfbstate",cur.fbState,30,null,"None",!1);var n=location.protocol+"//"+location.host+"/join?act=fb_sign",r=encodeURIComponent(n),o="https://graph.facebook.com/v3.3/oauth/authorize?client_id="+cur.fbApp+"&redirect_uri="+r+"&scope=email,user_birthday&display=popup&state="+cur.fbState,i=void 0!==window.screenX?window.screenX:window.screenLeft,a=void 0!==window.screenY?window.screenY:window.screenTop,s=void 0!==window.outerWidth?window.outerWidth:document.body.clientWidth,c=void 0!==window.outerHeight?window.outerHeight:document.body.clientHeight-22,l=parseInt(i+(s-640)/2,10),d=parseInt(a+(c-340)/2.5,10);return window.open(o,"fb_sign","width=640,height=340,left="+l+",top="+d),!1},fbFinish:function(e){e.error?(u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.FACEBOOK_REGISTRATION,u.EventFieldValues.REGISTERED_VIA_FB),u.registrationItemStat.logEvent(u.RegistrationItemEventTypes.SCREEN_PROCEED,u.EventScreens.OAUTH_FB,u.EventScreens.FACEBOOK_REGISTRATION_FAILED,{force:!0}),setTimeout((0,i.showFastBox)((0,s.getLang)("global_error"),e.error).hide,2e3)):e.date&&((0,o.lockButton)(cur.fbLoginButton||ge("index_fb"+(cur.fbContext||""))),nav.go("/join?act=fb_start"))}}},376270:(e,t,n)=>{"use strict";n.d(t,{hasAccessibilityMode:()=>l,updateOnlineText:()=>u,updateAriaCheckboxes:()=>d,updateAriaElements:()=>p,makeInteractiveMVKA11yProposal:()=>h});var r=n(386409),o=n(695724),i=n(315544),a=n(786067),s=n(726271),c=n(479957);function l(){return!(!window.vk||!vk.a11y)}function u(){clearTimeout(cur.updateOnlineTO),cur.updateOnlineTO=setTimeout((function(){(0,o.each)((0,i.geByClass)("_online"),(function(){var e=(0,i.geByClass1)("_online_reader",this)||this,t=(0,i.hasClass)(this,"online"),n=(0,i.hasClass)(this,"mobile"),r=(0,i.geByTag)("img",e),s=function(e){var t=(0,i.domClosest)("_post",e),n=t&&(0,i.domByClass)(t,"author");return n?n.innerText||n.textContent:""};if(t){var c="";(0,o.each)(r,(function(){var e=(0,i.attr)(this,"alt")||(0,i.attr)(this,"data-alt")||s(this);e&&(c=(0,o.trim)(c+" "+e),this.setAttribute("data-alt",e),this.removeAttribute("alt"))})),c=(0,o.trim)(c+" "+(n?(0,a.getLang)("global_user_is_online_mobile"):(0,a.getLang)("global_user_is_online"))),e.setAttribute("aria-label",c)}else(0,o.each)(r,(function(){var e=(0,i.attr)(this,"data-alt")||s(this);e&&(this.setAttribute("alt",e),this.removeAttribute("data-alt"))})),e.removeAttribute("aria-label")}))}),100)}function d(){clearTimeout(cur.updateChkBoxTO),cur.updateChkBoxTO=setTimeout((function(){var e=[];(0,o.each)(["checkbox","checkbox_pic"],(function(){e=e.concat((0,i.geByClass)(this))})),(0,o.each)(e,(function(){"DIV"!==this.tagName||this.getAttribute("role")||(this.setAttribute("role","checkbox"),this.setAttribute("aria-checked",(0,r.isChecked)(this)?"true":"false"),this.setAttribute("tabindex",0))}))}),100)}function _(){clearTimeout(cur.updateRadioBtnsTO),cur.updateRadioBtnsTO=setTimeout((function(){var e=[],t=(0,i.geByClass)("radiobtn");(0,o.each)(t,(function(){if("DIV"===this.tagName&&!this.getAttribute("role")){var t=(0,r.isChecked)(this);this.setAttribute("role","radio"),this.setAttribute("aria-checked",t?"true":"false"),this.setAttribute("tabindex",t?0:-1);var n=function(e){var t=5,n=0,r=e;for(;n<t&&r!==document;){if(r=(0,i.domPN)(r),(0,i.geByClass)("radiobtn",r).length>1)break;n++}return r}(this);~e.indexOf(n)||e.push(n)}})),(0,o.each)(e,(function(){if(!(0,i.geByClass)("on",this).length){var e=(0,i.geByClass)("radiobtn",this);e.length&&e[0].setAttribute("tabindex",0)}}))}),100)}function p(){u(),d(),_()}function h(){var e=document.getElementById("a11y_mvk_proposal");e&&e.getAttribute("aria-label")&&!e.getAttribute("role")&&(e.setAttribute("role","link"),e.style.display="block",e.classList.add("visually-hidden"),e.addEventListener("click",(e=>{var t;(0,c.statlogsValueEvent)("accessibility","is_mvk_proposal_clicked",null===(t=cur)||void 0===t?void 0:t.module),setTimeout((()=>{(0,s.redirectToMVK)()}),100)}),{passive:!0}))}},778273:(e,t,n)=>{"use strict";n.d(t,{updSeenAdsInfo:()=>a,__adsUpdate:()=>c,initAds:()=>d});var r=n(376567),o=n(695724),i=n(315544);function a(){if(((0,i.getXY)("ads_left",!0)||{})[1]&&vk.id){var e=(0,i.getXYRect)((0,i.geByTag1)("ol",(0,i.ge)("side_bar_inner")),!0),t=e?e.height:0,n=(0,i.getXYRect)((0,i.ge)("left_blocks"),!0),a=n?n.height:0,s=Math.max(Math.floor(((window.lastWindowHeight||0)-t-a-42-10)/260),0),c=(0,r.getCookie)("remixseenads");window.__seenAds=(0,o.intval)(c),c&&__seenAds===s||(window.__seenAds=s,(0,r.setCookie)("remixseenads",s,30))}}function s(e,t){return!window.noAdsAtAll&&(s=function(){return window.AdsLight&&AdsLight.getAjaxParams.apply(AdsLight.getAjaxParams,arguments)||{al_ad:null}},window.AdsLight?n=s(e,t):(n={al_ad:null},stManager.add([jsc("web/ads_light.js")],s.pbind(e,t))),n);var n}function c(e){if(window.noAdsAtAll)return!1;c=function(){window.AdsLight&&AdsLight.updateBlock.apply(AdsLight.updateBlock,arguments)},stManager.add([jsc("web/ads_light.js")],c.pbind(e))}function l(e,t,n,r,o,i){if(window.noAdsAtAll)return!1;l=function(){var e="";arguments&&arguments[0]&&(e=arguments[0]),"\x3c!--criteo"===e.slice(0,"\x3c!--criteo".length)&&Math.random()<.05&&(window.AdsLight&&AdsLight.setNewBlock?ajax.post("/wkview.php?act=mlet&mt=750",{},{onFail:()=>!0}):ajax.post("/wkview.php?act=mlet&mt=751",{},{onFail:()=>!0})),window.AdsLight&&AdsLight.setNewBlock.apply(AdsLight.setNewBlock,arguments)},stManager.add([jsc("web/ads_light.js")],l.pbind(e,t,n,r,o,i))}function u(e){if(window.noAdsAtAll)return!1;u=function(){window.AdsLight&&AdsLight.updateExternalStats.apply(AdsLight.updateExternalStats,arguments)},stManager.add([jsc("web/ads_light.js")],u.pbind(e))}function d(){window.__seenAds=(0,o.intval)((0,r.getCookie)("remixseenads")),window.__adsUpdate=c,window.__adsSet=l,window.__adsGetAjaxParams=s,window.__adsUpdateExternalStats=u}window.__adsLoaded=(0,o.vkNow)()},115471:(e,t,n)=>{"use strict";n.d(t,{AjaxCacheClient:()=>a});n(175115),n(991181),n(296253);var r=n(695724),o=n(668040);function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}class a{static getInstance(e,t){var n=a.makeCacheKey(e,t);return a._instances[n]||(a._instances[n]=new a(n)),a._instances[n]}constructor(e){a.ensureCachesInitialized(),this._cacheKey=e}getFromCache(e,t,n){var o=n.cacheLevel,i=void 0===o?0:o,a=n.forceGlobalCache,s=void 0!==a&&a,c=n.onAnswerProcessed,l=void 0===c?()=>{}:c;if(i>0||s){var u=window.ajaxCache[this._cacheKey];if(u&&u._loading)return u._callbacks.push(e),!1;if(u&&!s)return e(0,u),3===i&&delete window.ajaxCache[this._cacheKey],!1;if(u=window.globalAjaxCache[this._cacheKey])return-1===u||(0,r.isFunction)(u)?window.globalAjaxCache[this._cacheKey]=t:t.apply(window,u),l&&l(),!1}return window.ajaxCache[this._cacheKey]={_loading:1,_callbacks:[]},!0}processExistingCache(e,t){var n=window.ajaxCache[this._cacheKey];n&&n._loading&&(setTimeout((function(){for(var r in n._callbacks)n._callbacks.hasOwnProperty(r)&&n._callbacks[r](e,t)}),0),delete window.ajaxCache[this._cacheKey])}cacheResponse(e){window.ajaxCache[this._cacheKey]=e}static ensureCachesInitialized(){window.ajaxCache||(window.ajaxCache={}),window.globalAjaxCache||(window.globalAjaxCache={})}static makeCacheKey(e,t){var n=i({},t);return["al","al_ad","ads_section","ads_showed","captcha_sid","captcha_key","_smt","_preload"].forEach((e=>delete n[e])),e+"#"+(0,o.toQueryString)(n)}static preload(e,t,n){a.ensureCachesInitialized(),e&&"/"!==e.substr(0,1)&&(e="/"+e),window.ajaxCache[a.makeCacheKey(e,t)]=n}static invalidate(e,t){a.ensureCachesInitialized(),void 0===e?window.ajaxCache={}:delete window.ajaxCache[a.makeCacheKey(e,t)]}static invalidateFor(e){Object.keys(window.ajaxCache).forEach((t=>{e(t)&&delete window.ajaxCache[t]}))}}a._instances={}},711048:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{FrameTransport:()=>FrameTransport});var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(175115),_shared_lib_convert__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(668040),_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(695724),_web_lib_ui_util__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(159121),_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(787481),_web_lib_dom__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(315544),_shared_lib_site__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(961540);function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}var _queueStartMarker={type:"start"},_queueEndMarker={type:"end"};class FrameTransport{constructor(){this.frameDataQueue=[],this.frameTimeout=null,this.frame=null,this.queueReady=!1,this.fulfilled=!1,this.execInline=()=>{},this._debug=()=>{},window.addEventListener("message",this.onWindowMessage.bind(this))}setHandlers(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};this._onEnd=e,this._onModuleEvaluated=t,this._debug=n}setInlineHandler(e){this.execInline=e}run(e,t){return this._debug("Run ",e,this.frameDataQueue),this.frameUrl=e,this.onReady=t,this.fulfilled=!1,this.queueReady=!1,this.frameDataQueue=[_queueStartMarker],clearTimeout(this.frameTimeout),this.frameTimeout=!1,this.frame&&this._cleanup(),this.frame=ce("div",{innerHTML:"<iframe></iframe>"}),utilsNode.appendChild(this.frame),this.frame.firstChild.src=this.frameUrl,this}onWindowMessage(e){var t=!("isTrusted"in e)||e.isTrusted;if(_shared_lib_site__WEBPACK_IMPORTED_MODULE_6__.VK_ORIGIN_REGEX_STRICT.test(e.origin)&&t){var n=e.data,r=n.action,o=n.type,i=n.data;if("frame_transport"===o&&"use_meta"===r)this.useMeta(i)}}useMeta(e){this._debug("Metainfo: ",e),this.onReady(e)}useAjaxBlock(e,t,n){this._debug("Ajax block: ",e,t,n,this.fulfilled,this.frameDataQueue),this.fulfilled||(this.frameDataQueue.push(FrameTransport._makeQueueBlock(e,t,n)),1===this.frameDataQueue.length&&this._nextQueueItem())}finalize(e,t){this._debug("Finalize: ",e),this._cleanup(),e&&this.frameDataQueue.push(FrameTransport._makeQueueBlock(!1,!1,e,t)),this.queueReady=!0,this.frameDataQueue.push(_queueEndMarker),window.cur.onFrameBlocksDone&&window.cur.onFrameBlocksDone(),this._onEnd&&this._onEnd((new Date).getTime())}_nextQueueItem(){if(this.frameTimeout&&clearTimeout(this.frameTimeout),this.queueReady)if(this._debug("Next queue item: ",this.fulfilled,this.frameDataQueue),this.fulfilled||0===this.frameDataQueue.length)this.frameTimeout=!1;else{var e=this.frameDataQueue.shift();switch(e.type){case _queueStartMarker.type:this._nextQueueItem();break;case _queueEndMarker.type:this.fulfilled=!0;break;default:this.frameTimeout=setTimeout((()=>this._onReceived(e)),0)}}else this.frameTimeout=setTimeout((()=>this._nextQueueItem()),100)}_onReceived(e){var t=e.container&&ge(e.container);t&&e.html&&(t.firstChild?t.appendChild((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_5__.cf)(e.html)):val(t,e.html)),e.js&&(_runJs(e.js,((t,n)=>{(0,_web_lib_ui_util__WEBPACK_IMPORTED_MODULE_3__.topError)(t,{dt:15,type:8,url:this.frameUrl,js:n,answer:JSON.stringify(e)}),(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_4__.logEvalError)(t,n)})),this._onModuleEvaluated&&this._onModuleEvaluated(cur.module)),e.params&&"leftads"in e.params&&window.__adsSet&&__adsSet(e.params.leftads,e.params.ads_section||"",e.params.ads_can_show,e.params.ads_showed),this._nextQueueItem()}_cleanup(){this._debug("Cleanup: ",this.frameDataQueue),this.frame&&(this.frame.innerHTML="",utilsNode.removeChild(this.frame),this.frame=null)}abort(){clearTimeout(this.frameTimeout),this.frameTimeout=!1,this._cleanup()}static get frame(){return FrameTransport.__frame||(FrameTransport.__frame=new FrameTransport),FrameTransport.__frame}static request(e,t,n,r,o){var i=FrameTransport.frame;return i.setInlineHandler(o),i.run(FrameTransport.makeUrl(e,t,!(r&&r.noSort)),n)}static _makeQueueBlock(e,t,n,r){return{type:"block",container:e,html:t,js:n,params:r}}static makeUrl(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;return"string"==typeof t&&(r=(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_1__.fromQueryString)(t)),e+"?"+(r=(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_1__.toQueryString)(_extends({},r,{_rndVer:(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_2__.irand)(0,99999)}),!n))}}function _runJs(js,onError){var script="(function(){"+js+";})()";if(__debugMode)eval(script);else try{eval(script)}catch(e){onError&&onError(e,script)}}},896011:(e,t,n)=>{"use strict";n.d(t,{requestBox:()=>o,activateMobileBox:()=>i,validateMobileBox:()=>a,validatePassBox:()=>s,validateOtpBox:()=>c});var r=n(654612);function o(e,t,n){return e.setOptions({onDestroy:n}),e.onDone=function(){t&&t.apply(null,arguments)},e}function i(e){return o((0,r.showBox)("activation.php",{act:"activate_mobile_box",hash:e.hash}),(function(){vk.nophone=0,e.onDone()}),e.onFail)}function a(e){return o((0,r.showBox)("activation.php",{act:"validate_box",captcha:e.acceptCaptcha?1:"",skip_push:e.skip_push?e.skip_push:"",from:e.from||"",hash:e.hash,ahash:e.ahash},{stat:["uncommon.css"]}),e.onDone,e.onFail)}function s(e){return o((0,r.showBox)("activation.php",{act:"pass_validate_box",hash:e.hash},{stat:["uncommon.css"]}),e.onDone,e.onFail)}function c(e){return o((0,r.showBox)("activation.php",{act:"otp_validate_box",hash:e.hash},{stat:["uncommon.css"]}),e.onDone,e.onFail)}},113160:(e,t,n)=>{"use strict";n.d(t,{AjaxProtoJson:()=>o});var r=n(695724);class o{parseResponse(e){var t=this.parseStaticPayload(e);return{navVersion:(0,r.intval)(t.loaderVersion),newStatic:t.static,statsMeta:t.statsMeta,langId:(0,r.intval)(t.langPack),langVer:(0,r.intval)(t.langVersion),langKeys:t.langKeys,templates:t.templates,code:(0,r.intval)(t.payload[0]),payload:t.payload[1],debugLog:t.debugLog,env:t.env,extra:t.extra,execInline:t.execInline}}parseStaticPayload(e,t){var n=e;return e&&"string"==typeof e&&(n=JSON.parse(e)),n.payload&&n.payload[0]>0&&(n.payload[1]=n.payload[1].map((e=>"string"==typeof e?JSON.parse(e):e))),n}}},293680:(e,t,n)=>{"use strict";n.d(t,{ajax:()=>O});n(175115),n(751876),n(59357);var r,o,i,a,s,c=n(668040),l=n(40906),u=n(19331),d=n(695724),_=n(315544),p=n(159121),h=n(711048),f=n(115471),m=n(236783),v=n(421537),g=n(113160),y=n(66433),E=n(786067),w=n(553429),b=n(19834),C=n(638736);function S(){return S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S.apply(this,arguments)}class T{static post(e,t,n){T._protoAdapter=new g.AjaxProtoJson,e&&"/"!==e.substr(0,1)&&"http"!==e.substr(0,4)&&(e="/"+e);var r=S({},n||{},{_captcha:!1,_box:!1,no_ads_params:!1}),o=S({},t,{al:r.frame?-1:1}),i=(0,d.vkNow)(),a=vk.spentLastSendTS?Math.round((i-vk.spentLastSendTS)/1e3):0;if(vk.sampleUser>=0&&window.cur&&cur.module&&a>=1&&(window.curNotifier&&curNotifier.idle_manager&&!curNotifier.idle_manager.is_idle&&(o._smt=cur.module+":"+a),vk.spentLastSendTS=i),r.progress&&(r.showProgress||(r.showProgress=function(){var e=(0,_.ge)(r.progress);(0,_.hasClass)(e,"pr")&&(0,_.setStyle)(e,"opacity",1),(0,_.show)(e)}),r.hideProgress||(r.hideProgress=function(){var e=(0,_.ge)(r.progress);(0,_.hasClass)(e,"pr")&&(0,_.setStyle)(e,"opacity",0),(0,_.hide)(e)})),r.loader){var s=(0,_.isVisible)(window.boxLayerWrap);r.showProgress=function(){boxRefreshCoords(window.boxLoader),(0,_.show)(window.boxLoader),s||(0,_.show)(window.boxLayerWrap)},r.hideProgress=function(){(0,_.hide)(window.boxLoader),s||(0,_.hide)(window.boxLayerWrap)}}return new T(e,o,r)._post()}constructor(e,t,n){this._url=e,this._options=S({},n),this._query=t,this._additionalStaticLoader=null,this._cacheClient=null,n.local&&(this.onDone=(0,d.vkLocal)(this.onDone),this.onFail=(0,d.vkLocal)(this.onFail),this.processResponse=(0,d.vkLocal)(this.processResponse)),this._options.cache&&(this._cacheClient=f.AjaxCacheClient.getInstance(this._url,this._query)),this.onDone=this.onDone.bind(this),this.onFail=this.onFail.bind(this),this.processResponse=this.processResponse.bind(this)}_post(){if(!this._query.captcha_sid&&this._options.showProgress&&this._options.showProgress(),window.__adsGetAjaxParams&&!this._options.no_ads_params&&(this._query=S({},this._query,{},window.__adsGetAjaxParams(this._query,this._options))),this._options.stat&&(this._additionalStaticLoader=null,stManager.add(this._options.stat,(()=>{this._additionalStaticLoader&&this._additionalStaticLoader(),this._options.stat=!1}))),!this._cacheClient||this._cacheClient.getFromCache(this.processResponse,this._options.onDone,{cacheLevel:this._options.cache,forceGlobalCache:this._options.forceGlobalCache,onAnswerProcessed:this._options.hideProgress})){this._options.resend=(e,t)=>new T(this._url,e,t)._post(),window.debuglogSent?(this._reqid=window.debuglogSent(this._url+(this._query?": "+(0,c.toQueryString)(this._query,this._options.noSort).replace(/&/g,"&amp;"):"")),this._options.frame&&(window._lfrid=this._reqid)):this._reqid=0;var e={};return this._options.timeout&&(e.timeout=this._options.timeout),this._options.frame?h.FrameTransport.request(this._url,this._query,this.onDone,this._options,this._runInlineScript.bind(this)):(0,m.plainpost)(this._url,this._query,this.onDone,this.onFail,!1,e,this._options,!1,(0,u.partConfigEnabled)("extended_ajax_logging")?e=>console.log("+ XHR Transport: "+e):null)}}processResponse(e,t,n){if(this._options.cache&&this._cacheClient&&this._cacheClient.processExistingCache(e,t),this._options.stat)return this._options.stat=!1,void(this._additionalStaticLoader=this.processResponse.pbind(e,t));this._options.cache&&!this._options.forceGlobalCache&&!e&&this._cacheClient&&this._cacheClient.cacheResponse(t),this._options.hideProgress&&this._options.hideProgress(),2!==e&&(this._options._captcha&&(this._options._suggest&&(0,_.cleanElems)(this._options._suggest),this._options._captcha=P(this._options._captcha),this._options._suggest=this._options._captcha),this._options._box=P(this._options._box)),n&&this._runInlineScript(n),function(e){switch(e){case 1:return v.emailNotConfirmed;case 2:return v.showCaptcha;case 3:return v.authFailed;case 4:return v.makeRedirect;case 5:return v.reload;case 6:return v.mobileActivationRequired;case 7:return v.showMessage;case 8:return v.showError;case 9:return v.votesPayment;case 10:return v.zeroZone;case 11:case 12:return(0,v.mobileValidationRequired)(e);case 13:return v.evalCode;case 14:return v.otpBox;case 15:return v.passwordValidationRequired;default:return(0,v.defaultHandler)(e)}}(e)(this._options,t,this._query,this._url)}onFail(e,t){if(!(0,C.processWaf)(t)){this._options.hideProgress&&this._options.hideProgress(),this._options._suggest&&(0,_.cleanElems)(this._options._suggest);var n=t instanceof XMLHttpRequest?t.status:t;if(this._options._box=P(this._options._captcha,this._options._box),this._options._captcha=this._options._box,this._options._suggest=this._options._captcha,"string"==typeof e&&-1!==e.indexOf("The page is temporarily unavailable")&&__dev&&(0,d.inArray)(vk.id,[100]))this._post();else if(!this._options.onFail||!0!==this._options.onFail(e)){var r=(JSON.stringify(e)||"No error details").substr(0,300),o=this._query.act,i=this._query&&(0,c.toQueryString)(this._query,this._options.noSort),a=this._url,s={message:"Uncaught ajax error",status:n,data:{url:a,query:i}},l=[`url: ${a}`,o&&`act: ${o}`,r&&`text: ${r}`].filter((e=>e)).join(", ");0===s.status&&(0,u.partConfigEnabled)("js_errors_no_write_uncaught_errors")||(0,y.logError)(l,{environment:"uncaughtAjaxRequestError",breadcrumb:s}),__debugMode?console.error("Uncaught Ajax request error:",r,s):console.log("Uncaught Ajax request error:",r,s)}}}doReload(e){nav.reload({force:!0,from:e,url:this._url,query:this._query&&(0,c.toQueryString)(this._query)})}onDone(e,t){if(!(0,C.processWaf)(t||e)){this._options.bench&&(o=(new Date).getTime()),this._options.frame&&A("OnDone Req:",e);var n,r=t instanceof XMLHttpRequest?t.status:t;try{n=T._protoAdapter.parseResponse(e)}catch(t){return void this.onFail(e,r)}var i,a=n,s=a.navVersion,u=a.newStatic,h=a.statsMeta,f=a.langId,m=a.langVer,v=a.langKeys,g=a.templates,w=a.code,S=a.payload,P=a.debugLog,O=a.env,I=a.extra,k=a.execInline;if(s)if(vk.version&&vk.version!==s)s&&S.length>4?this.doReload(2):nav.strLoc?location.replace(l.locBase):(0,p.topError)("Server error.",{type:100});else if(vk.version=!1,this._options.frame&&(i=S),vk.lang!==f&&this._options.canReload)this.doReload(3);else{if(h&&(window.vk.statsMeta=h),v){var R=v.local,M=v.global;(0,E.addLangKeys)(R),(0,E.addLangKeys)(M,!0)}O&&O.pe&&(window.vk.pe=O.pe),g&&(0,d.addTemplates)(g),function(e,t,n,r,o){if(!window.stVersions||(0,l.isEmpty)(window.stVersions))return void o();var i=()=>{if(e===window.stVersions.nav)return function(e,t,n,r){var o=["common.css"];if(e)for(var i=0,a=(e=e.split(",")).length;i<a;++i)o.push(e[i]);if(stVersions.lang<n)for(var s in stVersions.lang=n,StaticFiles)StaticFiles.hasOwnProperty(s)&&/^lang\d/i.test(s)&&o.push(s);stManager.add(o,r,!0)}(t,0,r,o);setTimeout(i,100)};if(e!==window.stVersions.nav){var a="";window.navMapSection&&(a=`?section=${window.navMapSection}`);var s=vk.navPostfix||"";headNode.appendChild((0,_.ce)("script",{type:"text/javascript",src:`/js/loader_nav${s}${e}_${vk.lang}.js${a}`}))}setTimeout(i,0)}(s,u,0,m,(()=>{if(!this._options.frame)try{i=T._protoAdapter.parseStaticPayload(S,this._reqid),P&&D(P,this._reqid)}catch(t){var e={message:"JSON error",data:{answer:S,url:this._url,query:this._query&&(0,c.toQueryString)(this._query)}};(0,y.logError)(t,{environment:"ajax_request",breadcrumb:e}),console.error(t)}this.processResponse(w,i,k),(0,b._handleResponseExtraPayloads)(I)}))}else this.onFail(`<pre>${e}</pre>`,{status:-1})}}_runInlineScript(e){var t="__exec_container",n=document.getElementById(t);n&&document.body.removeChild(n);var r=document.createElement("script");r.id=t,r.innerHTML=e,document.body.appendChild(r)}}function A(){if((0,u.partConfigEnabled)("extended_ajax_logging")){var e;try{throw new Error}catch(t){e=t.stack}var t="+ Frame transport: "+arguments[0];console.groupCollapsed(t),[].slice.call(arguments,1).forEach((e=>console.log(JSON.stringify(e)))),console.log(e),console.groupEnd()}}function D(e,t){window.debuglogGot&&window.debuglogGot(t,e)}function P(){for(var e=0,t=arguments.length;e<t;++e){var n=arguments[e];n&&n.isVisible()&&(n.setOptions({onHide:!1,onDestroy:!1}),n.hide())}return!1}h.FrameTransport.frame.setHandlers((e=>s=e),(e=>{(0,w.triggerSubscribersOnModuleEvaluated)(),a=e}),A);var O={enabled:function(){try{return!!new XMLHttpRequest}catch(e){return!1}}(),set tStart(e){r=e},set tProcess(e){i=e},plainpost:m.plainpost,post:T.post,framepost:h.FrameTransport.request,_getreq:function(){return new XMLHttpRequest},request:m.request,preload:f.AjaxCacheClient.preload,invalidate:f.AjaxCacheClient.invalidate,tGetParam:function(){if(r&&a){var e=[o-r,i-o,undefined-i,s-r,a];for(var t in e)if(e.hasOwnProperty(t)){if(e[t]<0)return!1;if(!e[t]&&0!==e[t])return!1}return r=!1,e.join(",")}},AjaxRequest:T,AjaxCancellationToken:m.AjaxCancellationToken,frame:h.FrameTransport.frame,_framenext:()=>h.FrameTransport.frame._nextQueueItem(),framegot:(e,t,n)=>h.FrameTransport.frame.useAjaxBlock(e,t,n),_frameover:(e,t)=>h.FrameTransport.frame.finalize(e,t),_framedone:(e,t)=>h.FrameTransport.frame.onReady([e,t]),_debugLog:D}},421537:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{emailNotConfirmed:()=>emailNotConfirmed,showCaptcha:()=>showCaptcha,mobileValidationRequired:()=>mobileValidationRequired,passwordValidationRequired:()=>passwordValidationRequired,authFailed:()=>authFailed,makeRedirect:()=>makeRedirect,reload:()=>reload,mobileActivationRequired:()=>mobileActivationRequired,showMessage:()=>showMessage,showError:()=>showError,votesPayment:()=>votesPayment,otpBox:()=>otpBox,zeroZone:()=>zeroZone,evalCode:()=>evalCode,defaultHandler:()=>defaultHandler});var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(175115),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(59357),_shared_lib_convert__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(668040),_web_auth_auth__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(428163),_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(695724),_web_lib_message_box__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(654612),_web_lib_dom__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(315544),_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(787481),_web_lib_ui_util__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(159121),_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(486125),_web_gifts_gifts__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(965030),_modal_box__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(896011),_web_lib_environment__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(703797);function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}function resetOptionsCache(e){return e.cache?_extends({},e,{cache:-1}):e}function emailNotConfirmed(e,t){(0,_web_lib_message_box__WEBPACK_IMPORTED_MODULE_5__.showFastBox)({width:520,title:t[0],onDestroy:e.onFail},t[1])}function showCaptcha(e,t,n){2===(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__.intval)(t[1])?e._captcha=(0,_web_lib_message_box__WEBPACK_IMPORTED_MODULE_5__.showReCaptchaBox)(t[0],t[2],e._captcha,{onSubmit:function(t){var r=_extends({},n,{recaptcha:t,captcha_sid:null,captcha_key:null});e.resend(r,resetOptionsCache(e))},onDestroy:function(){e.onFail&&e.onFail()}}):e._captcha=(0,_web_lib_message_box__WEBPACK_IMPORTED_MODULE_5__.showCaptchaBox)(t[0],(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__.intval)(t[1]),e._captcha,{onSubmit:function(t,r){var o=_extends({},n,{captcha_sid:t,captcha_key:r});e.resend(o,resetOptionsCache(e))},onDestroy:function(){e.onFail&&e.onFail()}}),e._suggest=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_6__.geByClass1)("phone_validation_link",e._captcha.bodyNode),e._suggest&&addEvent(e._suggest,"click",(function(){e._box=(0,_modal_box__WEBPACK_IMPORTED_MODULE_11__.validateMobileBox)({onDone:e._captcha.submit})}))}var mobileValidationRequired=e=>(t,n,r)=>{t._box=(0,_modal_box__WEBPACK_IMPORTED_MODULE_11__.validateMobileBox)({acceptCaptcha:11===e,onDone:function(e,n){vk.nophone=0,e&&(t._captcha=(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_9__.curBox)());var o=e?_extends({},r,{captcha_sid:e,captcha_key:n}):r;t.resend(o,resetOptionsCache(t))},onFail:t.onFail,hash:n[0],ahash:n[1]})};function passwordValidationRequired(e,t,n){e._box=(0,_modal_box__WEBPACK_IMPORTED_MODULE_11__.validatePassBox)({onDone:()=>e.resend(n,resetOptionsCache(e)),onFail:e.onFail,hash:t[0]})}function authFailed(e,t,n){window.onReLoginDone=()=>e.resend(n,resetOptionsCache(e)),window.onReLoginFailed=function(e,t){(0,_web_auth_auth__WEBPACK_IMPORTED_MODULE_3__.logout)(),t?nav.go(t,null,{hard:!0}):-1===e?location.href=location.href.replace(/^http:/,"https:"):e?nav.go("/"):window.onReLoginDone()},window.utilsNode.appendChild((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_6__.ce)("iframe",{src:(0,_web_lib_environment__WEBPACK_IMPORTED_MODULE_12__.getLoginDomain)()+"?"+(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_2__.toQueryString)({role:"al_frame",_origin:window.locProtocol+"//"+window.locHost,ip_h:t[0]||window.vk.ip_h,to:t[1]||""})}))}function makeRedirect(e,t){(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__.intval)(t[1])?nav.go(t[0],!1,{nocur:"2"===t[1],noback:!0===t[1],showProgress:e.showProgress,hideProgress:e.hideProgress}):(hab.stop(),location.href=t[0])}function reload(e,t,n,r){nav.reload({force:(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__.intval)(t[0]),from:1,url:r,query:n&&(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_2__.toQueryString)(n)})}function mobileActivationRequired(e,t,n){e._box=(0,_modal_box__WEBPACK_IMPORTED_MODULE_11__.activateMobileBox)({onDone:e.resend(n,resetOptionsCache(e)),onFail:e.onFail,hash:t[0]})}function showMessage(e,t){e.onFail&&e.onFail(),(0,_web_lib_ui_util__WEBPACK_IMPORTED_MODULE_8__.topMsg)(t[0],10)}function showError(e,t,n,r){e.onFail&&e.onFail(t[0])||(0,_web_lib_ui_util__WEBPACK_IMPORTED_MODULE_8__.topError)(t[0]+(t[2]?" #"+t[2]:""),{dt:t[1]?0:10,type:4,url:r,query:n&&(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_2__.toQueryString)(n)})}function votesPayment(e,t,n){var r;if(!e.fromBox&&!e.forceDone||(e.onDone&&e.onDone.apply(window,t),!e.fromBox)){e._box=(0,_web_lib_message_box__WEBPACK_IMPORTED_MODULE_5__.showFastBox)({title:(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__.trim)(t[0])},t[1]),(null===(r=t[3])||void 0===r?void 0:r.countries)&&!cur.votesBoxOptions&&(cur.votesBoxOptions=t[3]),cur.votesBoxOptions&&(_web_gifts_gifts__WEBPACK_IMPORTED_MODULE_10__.Gifts.processBoxOptions(e._box,cur.votesBoxOptions),cur.votesBoxOptions=null);var o=(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__.extend)((0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__.clone)(e),{showProgress:e._box.showProgress,hideProgress:e._box.hideProgress});e.cache&&(o.cache=-1),e._box=(0,_modal_box__WEBPACK_IMPORTED_MODULE_11__.requestBox)(e._box,(function(t){(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_6__.isVisible)(e._box.progress)||(t||(t={_votes_ok:1}),e.resend((0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_4__.extend)(n,t),o))}),e.onFail),e._box.evalBox(t[2])}}function otpBox(e,t,n){e._box=(0,_modal_box__WEBPACK_IMPORTED_MODULE_11__.validateOtpBox)({onDone:()=>e.resend(n,resetOptionsCache(e)),onFail:e.onFail,hash:t[0]})}function zeroZone(e,t,n){e._box=(0,_web_lib_message_box__WEBPACK_IMPORTED_MODULE_5__.showFastBox)({title:t[0]||getLang("global_charged_zone_title"),onHide:e.onFail},t[1],getLang("global_charged_zone_continue"),(function(){e.resend(_extends({},n,{charged_confirm:t[3]}),e)}),getLang("global_cancel"))}function evalCode(options,answer){var evalString=`(function(){${answer[0]};})()`;if(__debugMode)eval(evalString);else try{eval(evalString)}catch(e){(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_7__.logEvalError)(e,evalString)}}var defaultHandler=e=>(t,n)=>{if(-1===e||-2===e||-3===e){var r,o=n.pop(),i=n.pop(),a=n.pop();-3===e&&(r=n.pop()),window.__adsSet&&__adsSet(a,null,i,o,null,r)}t.onDone&&t.onDone.apply(window,n)}},236783:(e,t,n)=>{"use strict";n.d(t,{plainpost:()=>d,request:()=>_,AjaxCancellationToken:()=>u});n(530522),n(66108),n(579665),n(95767),n(991181),n(940851),n(296253),n(751876);var r=n(668040),o=n(256512),i=n(695724),a=n(19331),s=n(638736);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}class u{_setCancelCb(e){this._cancel=e}cancel(){this._cancel&&this._cancel()}}function d(e,t,n,o,i,s,l){var u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null;if(t.act&&(0,a.partConfigEnabled)("force_act_in_get_params")){var p={},h=e,f="";if(e.includes("?")){var m=e.split("?"),v=c(m,2);h=v[0],f=v[1],p=(0,r.fromQueryString)(f)}p.act=t.act,e=`${h}?${(0,r.toQueryString)(p,!0)}`}var g=_(e,t,{xhrOptions:s,sortQueryStringParams:l&&!l.noSort,headers:l&&l.headers,noExtraHeaders:u,urlOnly:i,cancellationToken:l&&l.cancellationToken,logger:d}),y=g._getXhr();return g.then((e=>n&&n(e.data,y.status))).catch((e=>o&&o(e,y.status))),y}function _(e,t,n){var c,l=n.xhrOptions,u=n.headers,d=void 0===u?null:u,_=n.urlOnly,p=void 0!==_&&_,h=n.sortQueryStringParams,f=void 0===h||h,m=n.noExtraHeaders,v=void 0!==m&&m,g=n.cancellationToken,y=void 0===g?null:g,E=n.logger,w=void 0===E?null:E;w&&(c=(0,o.crc32)(e+JSON.stringify(t)),w(`Initialized request #${c} with URL ${e} and query ${JSON.stringify(t)}`));var b=new XMLHttpRequest;y&&y._setCancelCb((()=>{w&&w(`Aborting request #${c}`),b.abort()}));var C=new Promise((function(n,o){var u="string"!=typeof t?(0,r.toQueryString)(t,!f):t;b.onreadystatechange=function(){if(b.readyState===XMLHttpRequest.DONE)if(w&&w(`Request readyState -> DONE with status ${b.status} #${c}`),b.status>=200&&b.status<300)try{n({data:b.responseText,code:b.status}),w&&w(`Success handler finished for request #${c}`)}catch(e){w&&w(`Success handler failed for request #${c}`),o({data:b.responseText,code:-1}),w&&w(`Failure handler finished for request #${c} [1]`)}else o({data:b.responseText,url:e,act:t.act,code:b.status}),w&&w(`Failure handler finished for request #${c} [2]`);else(0,a.partConfigEnabled)("waf_ajax_headers_check")&&b.readyState===XMLHttpRequest.HEADERS_RECEIVED&&(0,s.processWaf)(b)&&b.abort()};try{w&&w(`Starting request #${c}`),b.open("POST",e,!0)}catch(e){w&&w(`Request #${c} failed`),o({data:e,code:-1}),w&&w(`Failure handler finished for request #${c} [3]`)}d&&Object.keys(d).forEach((e=>{b.setRequestHeader(e,d[e])})),l&&(0,i.each)(l,(function(e,t){b[e]=t})),p||(b.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),v||b.setRequestHeader("X-Requested-With","XMLHttpRequest")),w&&w(`Sending data for request #${c}`),b.send(u)}));return C._getXhr=()=>b,C}},486125:(e,t,n)=>{"use strict";n.d(t,{curBox:()=>l,initBoxQueue:()=>u,boxRefreshCoords:()=>d,showDoneBox:()=>_,showDoneBoxFull:()=>p,getAndCleanBoxQueueData:()=>f,restoreBoxQueue:()=>m});n(175115);var r=n(49535),o=n(695724),i=n(315544),a=n(726271);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}var c={hideAll:function(e,t){if(e)for(;c.count();)c.hideLast();else{if(c.count()){var n=_message_boxes[c._boxes.pop()];n&&(n._in_queue=!1,n._hide(!1,!1,t))}for(;c.count();){_message_boxes[c._boxes.pop()]._in_queue=!1}}},hideLast:function(e,t){if(c.count()){var n=window._message_boxes[c._boxes[c.count()-1]];if(!0===e&&(n.changed||n.preventHideLastWithCheck||c.skip||t&&t.target&&t.target.tagName&&"input"!==t.target.tagName.toLowerCase()&&cur.__mdEvent&&t.target!==cur.__mdEvent.target))return void(c.skip=!1);n.hide()}if(t&&"click"===t.type)return(0,r.cancelEvent)(t)},hideBGClick:function(e){e&&e.target&&/^box_layer/.test(e.target.id)&&c.hideLast()},count:function(){return c._boxes.length},_show:function(e){var t=_message_boxes[e];if(t&&!t._in_queue){c.count()?_message_boxes[c._boxes[c.count()-1]]._hide(!0,!0):window.tooltips&&tooltips.hideAll(),t._in_queue=!0;var n=!!c.count();n&&(n=c._boxes.every((e=>!!_message_boxes[e]&&!_message_boxes[e].forceHide))),c.curBox=e,t._show(n||c.currHiding,n),c._boxes.push(e)}},_hide:function(e){var t=_message_boxes[e];if(t&&t._in_queue&&c._boxes[c.count()-1]===e&&t.isVisible()&&(t._in_queue=!1,c._boxes.pop(),t._hide(!!c.count()),c.count())){var n=c._boxes[c.count()-1];c.curBox=n,_message_boxes[n]._show(!0,!0,!0)}},_boxes:[],curBox:0};function l(){var e=window._message_boxes[window.boxQueue.curBox];return e&&e.isVisible()?e:null}function u(){window.boxQueue=c,window.__bq=c,window.curBox=l,window.boxQueue.hideLastCheck=window.boxQueue.hideLast.pbind(!0),window._message_box_guid=0,window._message_boxes=[]}function d(e){var t=window.innerHeight||document.documentElement.clientHeight||boxLayerBG.offsetHeight,n=a.browser.mobile?(0,o.intval)(window.pageYOffset):0,r=(0,i.getSize)(e);e.style.marginTop=Math.max(10,n+(t-r[1])/3)+"px"}function _(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};window.Notifier?h(e,t,n):window.stManager.add(["notifier.js","notifier.css"],(()=>{h(e,t,n)}))}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=s({},n,{type:"done_box_full"});_(e,t,r)}function h(e,t,n){window.curNotifier&&window.curNotifier.version||window.Notifier.init({version:-1,instance_id:-1});var r=void 0!==t.onHide?t.onHide:t.callback,o=void 0!==t.timeout?t.timeout:void 0!==t.out?t.out:null,i=null!==t.id&&void 0!==t.id?t.id:++window.curNotifier.showDoneBoxLastId,a=s({version:window.curNotifier.version,type:"done_box",text:e,onclick:t.onClick,top_count:-1,id:i,timeout:o,onHide:r,preventHideByClick:!0,link:t.link},n);t.tooltipHandler&&(a.tooltipHandler=t.tooltipHandler),Notifier.pushEvent(a)}function f(){var e={boxes:window._message_boxes,boxQueueIds:window.boxQueue._boxes,curBoxId:window.boxQueue.curBox};return window.boxQueue._boxes=[],window._message_boxes=[],window.boxQueue.curBox=0,e}function m(e){window._message_boxes=e.boxes,window.boxQueue._boxes=e.boxQueueIds,window.boxQueue.curBox=e.curBoxId}},475632:(e,t,n)=>{"use strict";n.d(t,{cancelStackFilter:()=>o,cancelStackPush:()=>i,cancelStackPop:()=>a});var r=n(689433);function o(e,t){var n=window.cancelStack||[];return t&&(0,r.topHeaderClearClose)(),window.cancelStack=n.filter((t=>t.name!==e)),window.cancelStack}function i(e,t,n){return n&&(0,r.topHeaderClose)((function(){t(),o(e)})),window.cancelStack=o(e).concat([{func:t,name:e,dclick:n}]),window.cancelStack}function a(e){var t=window.cancelStack||[];(0,r.topHeaderClearClose)(),t.length>0&&t.pop().func(e);var n=t[t.length-1];return n&&n.dclick&&(0,r.topHeaderClose)((function(){n.func(e),o(n.name)})),window.cancelStack=t,window.cancelStack}},601984:(e,t,n)=>{"use strict";n.d(t,{getFiles:()=>s,clipboardProcessPaste:()=>u,copyToClipboard:()=>o._copyWithFakeElement});n(530522),n(66108),n(991181),n(579665),n(95767),n(940851),n(296253);var r=n(138974),o=n(153271);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e){var t=function(e){return e&&e.clipboardData?e.clipboardData:e&&e.originalEvent&&e.originalEvent.clipboardData?e.originalEvent.clipboardData:window.clipboardData}(e);if(!t)return[];var n=t.items;if(!n)return[];for(var r=[],o=0;o<n.length;o++)0==n[o].type.indexOf("image")&&r.push(n[o].getAsFile());return r}var c=!1,l=null;function u(e){return new Promise(((t,n)=>{if(c)return cancelEvent(e),n();var o=i((0,r.rangeGet)(),5),a=o[0],s=o[1],u=o[2],d=o[3],_=o[4];if(a){if("paste"===e.type){var p=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData;if(p&&p.types&&p.getData){cancelEvent(e),c=!0;var h=p.getData("text/html")||clean(p.getData("text/plain"))||"";return t([h,e=>{(0,r.rangeInsert)(a,e),c=!1}])}for(var f=cf(),m=e.target||window.event.srcElement;m.firstChild;)f.appendChild(m.firstChild);return new Promise((e=>setTimeout((()=>{var t=m.innerHTML||"";m.innerHTML="",m.appendChild(f),e([t,e=>{a=(0,r.rangeCreate)(s,u,d,_),(0,r.rangeInsert)(a,e),c=!1}])}),0)))}if("beforepaste"===e.type)return c=!0,function(){if(!l){var e=ge("utils");l=ce("div",{},{width:"10px",height:"10px",overflow:"hidden"}),attr(l,"contenteditable","true"),e.appendChild(l)}}(),l.focus(),void(l.onpaste=()=>{setTimeout((()=>{var e=l.innerHTML||"";l.innerHTML="",delete l.onpaste,t([e,e=>{a=(0,r.rangeCreate)(s,u,d,_),(0,r.rangeInsert)(a,e),c=!1}])}),0)})}return n()}))}},289988:(e,t,n)=>{"use strict";n.d(t,{isToday:()=>i,isYesterday:()=>a,isTomorrow:()=>s,isSameDate:()=>c,leadingZero:()=>l,formatTime:()=>u,getServerTime:()=>d,getBeginningOfDay:()=>_,isLeapYear:()=>p,getLastDay:()=>h,getFormattedDiffTimeText:()=>f,getUnixTimestampFromDate:()=>m});var r=n(786067),o=n(695724);function i(e){var t=new Date;return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function a(e){return i(new Date(e.getTime()+864e5))}function s(e){return i(new Date(e.getTime()-864e5))}function c(e,t){var n=new Date(e),r=new Date(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()}function l(e){return e>=10?e:"0"+e}function u(e,t){var n;e=Math.max(e,0);var r=Math.floor(e%60);n=r<10?"0"+r:r;var o=(e=Math.floor(e/60))%60;return n=o+":"+n,((e=Math.floor(e/60))>0||t)&&(o<10&&(n="0"+n),n=e+":"+n),n}function d(){return vk.ts+Math.floor(((new Date).getTime()-vk.started)/1e3)}function _(e){var t=e.getFullYear(),n=e.getMonth(),r=e.getDate();return new Date(t,n,r,0,0,0,0)}function p(e){return(e=parseInt(e))%4==0&&e%100!=0||e%400==0}function h(e,t){return 2==+t?p(e)?29:28:t>0&&(t<8&&t%2==0||t>7&&t%2==1)?30:31}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e<5?(0,r.getLang)("global_just_now"):e<60?(0,r.langWordNumeric)(e,(0,r.getLang)("global_word_secs_ago","raw"),(0,r.getLang)("global_secs_ago","raw")):e<3600?(0,r.langWordNumeric)((0,o.intval)(e/60),(0,r.getLang)("global_word_mins_ago","raw"),(0,r.getLang)("global_mins_ago","raw")):e<14400?(0,r.langWordNumeric)((0,o.intval)(e/3600),(0,r.getLang)("global_word_hours_ago","raw"),(0,r.getLang)("global_hours_ago","raw")):t}function m(e){return Math.floor(e.getTime()/1e3)}},787481:(e,t,n)=>{"use strict";n.d(t,{initDebugTools:()=>s,logEvalError:()=>c,debugLog:()=>l,debugEl:()=>u});n(66108),n(296253),n(59357);var r=n(726271),o=n(19331),i=n(66433);function a(){if((0,o.partConfigEnabled)("log_fetch_requests")){var e=(e,t)=>{try{if(~e.indexOf("/al_audio")||~e.indexOf("/like.php"))throw new Error(t)}catch(e){(0,i.debugBufferLog)(e)}};!function(e){var t=window.XMLHttpRequest;window.XMLHttpRequest=function(){var n,r,i=new t,a=i.open,s=i.send;return i.open=function(){var e=Array.prototype.slice.call(arguments);return r=e[0],n=e[1],a.apply(i,arguments)},i.send=function(){var t=arguments[0];return("POST"===(r=(r||"").toUpperCase())||"GET"===r&&(0,o.partConfigEnabled)("log_fetch_requests_get"))&&e(n,[r,n,t].join(":")),s.apply(i,arguments)},i},["DONE","HEADERS_RECEIVED","LOADING","OPENED","UNSENT"].forEach((e=>{Object.defineProperty(window.XMLHttpRequest,e,{enumerable:!1,configurable:!1,writable:!1,value:t[e]})}))}(e),window.fetch&&function(e){var t=window.fetch;window.fetch=function(){for(var n=new Array(arguments.length),r=0;r<n.length;++r)n[r]=arguments[r];var o,i=n[0],a="GET";"string"==typeof i?o=i:"Request"in window&&i instanceof window.Request?(o=i.url,i.method&&(a=i.method)):o=""+i,n[1]&&n[1].method&&(a=n[1].method);var s={method:a,url:o,status_code:null};return e(o,o),t.apply(this,n).then((function(e){return s.status_code=e.status,e})).catch((function(e){throw e}))}}(e)}}function s(){window._logTimer=(new Date).getTime(),a()}function c(e,t){if(window.Raven){if(t&&t.length>2e3){var n=t.indexOf("; window.TimeSpent && TimeSpent.setTimers && TimeSpent.setTimers(");~n&&(t=t.slice(0,n)),t=`${t.slice(0,1e3)}...${t.slice(-1e3)}`}e.message+=`: ${t}`,(0,i.logError)(e)}}function l(e){try{window.debuglogClient&&debuglogClient(e);var t="["+((new Date).getTime()-window._logTimer)/1e3+"] ";if(window.console&&console.log){var n=Array.prototype.slice.call(arguments);n.unshift(t),r.browser.msie||r.browser.mobile?console.log(n.join(" ")):console.log.apply(console,n)}}catch(e){}}function u(e){if(!e)return!1;var t=e.tagName,n=e.id,r=e.className,o=(t||"").toLowerCase();return r&&(o+="."+e.className.replace(/\s+/g,".")),n&&!/^__vk/.test(n)&&(o+=`#${e.id}`),o||(e.toString()||"[NULL]")}},315544:(e,t,n)=>{"use strict";n.d(t,{geById:()=>s,$:()=>c,$$:()=>l,setInnerText:()=>u,emptyNode:()=>d,ge:()=>_,geByTag:()=>p,geByTag1:()=>h,geByClass:()=>f,geByClass1:()=>m,gpeByClass:()=>v,domQuery:()=>g,domQuery1:()=>y,domClosest:()=>E,domClosestByTag:()=>w,gpeByTag:()=>b,ce:()=>C,cf:()=>P,re:()=>O,domEL:()=>I,domNS:()=>k,domPS:()=>R,domFC:()=>M,domLC:()=>L,domPN:()=>x,se:()=>N,sech:()=>B,rs:()=>U,domReplaceEl:()=>F,domChildren:()=>W,domInsertBefore:()=>V,domInsertAfter:()=>H,domByClass:()=>j,domData:()=>K,domChildIndex:()=>z,domCA:()=>G,domClosestSibling:()=>q,matchesSelector:()=>Y,isHover:()=>$,isAncestor:()=>X,getScroll:()=>Q,domClosestPositioned:()=>J,domClosestOverflowHidden:()=>Z,show:()=>ee,hide:()=>te,isVisible:()=>ne,clientHeight:()=>re,getClientRectOffsetY:()=>oe,toggle:()=>ie,boundingRectEnabled:()=>ae,getXYRect:()=>se,getXY:()=>ce,isWindow:()=>le,getSize:()=>ue,getW:()=>de,getH:()=>_e,hasClass:()=>pe,addClass:()=>he,addClassDelayed:()=>fe,removeClass:()=>me,removeClassDelayed:()=>ve,toggleClass:()=>ge,toggleClassDelayed:()=>ye,replaceClass:()=>Ee,getStyle:()=>we,setStyle:()=>be,data:()=>Ce,attr:()=>Se,removeAttr:()=>Te,removeData:()=>Ae,cleanElems:()=>De,setTitle:()=>Pe,getZoom:()=>Oe,val:()=>Ie,elfocus:()=>ke,traverseParent:()=>Re,setDocumentTitle:()=>Le,lockDocumentTitle:()=>xe,initDomScripts:()=>Ne,createElement:()=>Be});n(751876),n(21466),n(66108),n(296253),n(283946),n(59357);var r=n(695724),o=n(49535),i=n(726271),a=n(787481);function s(e){return document.getElementById(e)}function c(e,t){return(t||document).querySelector(e)}function l(e,t){return(t||document).querySelectorAll(e)}function u(e,t){e&&(e.innerText=t)}function d(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)}var _=e=>"string"==typeof e||"number"==typeof e?document.getElementById(e):e;function p(e,t){return(t=_(t)||document).getElementsByTagName(e)}function h(e,t){return(t=_(t)||document).querySelector&&t.querySelector(e)||p(e,t)[0]}function f(e,t,n){return t=_(t)||document,n=n||"*",e=("."+e).replace(/\s+/gm,"."),Array.prototype.slice.call(t.querySelectorAll(n+e))}function m(e,t,n){return n=n||"*",(t=_(t)||document).querySelector&&t.querySelector(n+("."+e).replace(/\s+/gm,"."))||f(e,t,n)[0]}function v(e,t,n){if(!(t=_(t)))return null;for(;n!==t&&(t=t.parentNode);)if(pe(t,e))return t;return null}function g(e,t){return(t||document).querySelectorAll(e)}function y(e,t){return(t||document).querySelector(e)}function E(e,t){return pe(t,e)?t:v(e,t)}function w(e,t){return e=e.toUpperCase(),t.nodeType===Node.ELEMENT_NODE&&t.tagName.toUpperCase()===e?t:b(e,t)}function b(e,t){if(!(t=_(t)))return null;for(e=e.toUpperCase();t=t.parentNode;)if(t.tagName&&t.tagName.toUpperCase()===e)return t;return null}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=document.createElement(e);return t&&(0,r.extend)(o,t),n&&be(o,n),o}var S,T,A,D,P=(S=document,T=S.createDocumentFragment(),A=S.createElement("div"),D=S.createRange&&S.createRange(),T.appendChild(A),D&&D.selectNodeContents(A),D&&D.createContextualFragment?e=>e?D.createContextualFragment(e):S.createDocumentFragment():e=>{if(!e)return S.createDocumentFragment();A.innerHTML=e;for(var t=S.createDocumentFragment();A.firstChild;)t.appendChild(A.firstChild);return t});function O(e){return(e=_(e))&&e.parentNode&&e.parentNode.removeChild(e),e}function I(e,t){for(t=t?"previousSibling":"nextSibling";e&&!e.tagName;)e=e[t];return e}var k=e=>I((e||{}).nextSibling),R=e=>I((e||{}).previousSibling,1),M=e=>I((e||{}).firstChild),L=e=>I((e||{}).lastChild,1),x=e=>(e||{}).parentNode,N=e=>M(C("div",{innerHTML:e})),B=e=>W(C("div",{innerHTML:e}));function U(e,t){return(0,r.each)(t,(function(t,n){e=e.replace(new RegExp("%"+t+"%","g"),(void 0===n?"":n).toString().replace(/\$/g,"&#036;"))})),e}function F(e,t){return(0,r.isString)(t)&&(t=N(t)),x(e).replaceChild(t,e),t}function W(e){for(var t=[],n=e.childNodes,r=0;r<n.length;r++)n[r].tagName&&t.push(n[r]);return t}function V(e,t){var n=x(t);return n&&n.insertBefore(e,t)}function H(e,t){var n=x(t);return n&&n.insertBefore(e,k(t))}function j(e,t){return e?m(t,e):e}function K(e,t,n){return e?void 0!==n?(null===n?e.removeAttribute("data-"+t):e.setAttribute("data-"+t,n),n):e.getAttribute("data-"+t):null}function z(e){for(var t=0;null!=(e=R(e));)t++;return t}function G(e,t){do{e=x(e)}while(e&&!Y(e,t));return e}function q(e,t,n){for(var r=null;null===r&&e;)(e=-1===n?R(e):k(e))&&Y(e,t)&&(r=e);return r}function Y(e,t){if(!(e=_(e))||e===document)return!1;var n=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1};return n.call(e,t)}function $(e){return Y(e,":hover")}function X(e,t){var n=_(e);if(t=_(t),!e||!t)return!1;for(;n=n.parentNode;)if(n===t)return!0;return!1}function Q(){var e=i.browser.msie6?_("PageContainer"):document.body,t=document.documentElement;return[e.scrollLeft||t.scrollLeft||window.pageXOffset||0,e.scrollTop||t.scrollTop||window.pageYOffset||0,t.clientWidth||e.clientWidth||0,t.clientHeight||e.clientHeight||0]}function J(e,t){for(var n=(t=t||{}).fromEl||x(e),o=t.positions||["relative","absolute","fixed"];n&&n!==bodyNode;){var i=we(n,"position");if((0,r.inArray)(i,o)&&(!t.noOverflow||"hidden"!==we(n,"overflow")))break;n=x(n)}return n}function Z(e,t){for(var n,r,o,a=e=_(e),s=!1;a&&a.tagName&&a!==bodyNode;){if(n=we(a,"position"),r=we(a,"overflow"),o=we(a,"transform"),t&&i.browser.mozilla){if("page_wrap"!=a.id&&a!==e&&"visible"!==r&&("static"===n?!s||"relative"===s:"fixed"!==s))break}else if(a!==e&&"visible"!==r&&("static"===n?!s||"relative"===s:"fixed"!==s))break;"none"!==o?s=void 0:"static"!==n&&"fixed"!==s&&(s=n),a=x(a)}return a}function ee(e){var t=arguments.length;if(t>1)for(var n=0;n<t;n++)ee(arguments[n]);else if((e=_(e))&&e.style){var r=e.olddisplay,o=e.tagName.toLowerCase(),a="block";e.style.display=r||"","none"===we(e,"display")&&(a=pe(e,"inline")||pe(e,"_inline")?"inline":pe(e,"_inline_block")?"inline-block":"tr"!==o||i.browser.msie?"table"!==o||i.browser.msie?"block":"table":"table-row",e.style.display=e.olddisplay=a)}}function te(e){var t=arguments.length;if(t>1)for(var n=0;n<t;n++)te(arguments[n]);else if((e=_(e))&&e.style){var r=we(e,"display");e.olddisplay="none"!==r?r:"",e.style.display="none"}}function ne(e){return!(!(e=_(e))||!e.style)&&"none"!==we(e,"display")}function re(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}function oe(e,t,n){n=n||0;var o=ce(e=_(e))[1],i=ue(e)[1],a=window,s=document.documentElement,c=Math.max((0,r.intval)(a.innerHeight),(0,r.intval)(s.clientHeight)),l=_("page_header_cont"),u=s.scrollTop||bodyNode.scrollTop||window.scrollY||0,d=vk.staticheader?Math.max(0,ue(l)[1]-u):ue(l)[1];if(t){if(o+i<u+d+n)return o+i-u-d-n;if(o>u+c-n)return o-u-c+n}else{if(o<u+d+n)return o-u-d-n;if(o+i>u+c-n)return o+i-u-c+n}return 0}function ie(e,t){return void 0===t&&(t=!ne(e)),t?ee(e):te(e),t}function ae(e){return void 0!==e.getBoundingClientRect}function se(e,t){var n;if(t&&"inline"===we(e,"display")){var r=e.getClientRects();n=r&&r[0]||e.getBoundingClientRect()}else n=e.getBoundingClientRect();return n}function ce(e,t){if(!(e=_(e)))return[0,0];var n=e.ownerDocument,r={top:0,left:0};if(!n)return[0,0];var o=n.documentElement;ae(e)&&(r=se(e,!0));var i=n===n.window?n:9===n.nodeType&&(n.defaultView||n.parentWindow);return[r.left+(t?0:i.pageXOffset||o.scrollLeft)-(o.clientLeft||0),r.top+(t?0:i.pageYOffset||o.scrollTop)-(o.clientTop||0)]}function le(e){return null!=e&&e===e.window}function ue(e,t,n){e=_(e);var o,i=document.documentElement,a=[0,0];if(t&&"border-box"===we(e,"boxSizing")&&(t=!1),e===document)a=[Math.max(i.clientWidth,bodyNode.scrollWidth,i.scrollWidth,bodyNode.offsetWidth,i.offsetWidth),Math.max(i.clientHeight,bodyNode.scrollHeight,i.scrollHeight,bodyNode.offsetHeight,i.offsetHeight)];else if(e){function i(){a=ae(e)&&(o=se(e,n))&&void 0!==o.width?[o.width,o.height]:[e.offsetWidth,e.offsetHeight],t&&(0,r.each)(a,(function(t,n){var o=t?["Top","Bottom"]:["Left","Right"];(0,r.each)(o,(function(){a[t]-=parseFloat(we(e,"padding"+this))||0,a[t]-=parseFloat(we(e,"border"+this+"Width"))||0}))}))}if(ne(e))i();else{var s={position:"absolute",visibility:"hidden",display:"block"},c={},l=!1;e.style.cssText.indexOf("!important")>-1&&(l=e.style.cssText),(0,r.each)(s,(function(t,n){c[t]=e.style[t],e.style[t]=n})),i(),(0,r.each)(s,(function(t,n){e.style[t]=c[t]})),l&&(e.style.cssText=l)}}return a}function de(e){return ue(e)[0]}function _e(e){return ue(e)[1]}function pe(e,t){var n=_(e);return n&&n.classList&&n.classList.contains(t)}function he(e,t){var n=_(e);n&&n.classList&&(t.includes(" ")?` ${n.className} `.includes(` ${t} `)||(n.className=(n.className?`${n.className} `:"")+t):t.length&&!n.classList.contains(t)&&n.classList.add(t))}var fe=(e,t,n)=>{n=(0,r.positive)(n),setTimeout(he.pbind(e,t),n)};function me(e,t){var n=_(e);t.length&&n&&n.classList&&n.classList.contains(t)&&n.classList.remove(t)}var ve=(e,t,n)=>{n=(0,r.positive)(n),setTimeout(me.pbind(e,t),n)};function ge(e,t,n){var r=_(e);if(!t.length||!r||!r.classList)return!1;if(void 0===n)return r.classList.toggle(t);var o=r.classList.contains(t);return n&&!o?r.classList.add(t):!n&&o&&r.classList.remove(t),n}function ye(e,t,n,o){return o=(0,r.positive)(o),void 0===n&&(n=!pe(e,t)),(n?fe:ve)(e,t,o),n}function Ee(e,t,n){me(e,t),he(e,n)}function we(e,t,n){if(e=_(e),(0,r.isArray)(t)){var o={};return(0,r.each)(t,((t,n)=>o[n]=we(e,n))),o}if(!e)return"";if(void 0===n&&(n=!0),!n&&"opacity"===t&&i.browser.msie){var a=e.style.filter;return a?a.indexOf("opacity=")>=0?parseFloat(a.match(/opacity=([^)]*)/)[1])/100+"":"1":""}if(!n&&e.style&&(e.style[t]||"height"===t))return e.style[t];var s,c=document.defaultView||window;if(c.getComputedStyle){t=t.replace(/([A-Z])/g,"-$1").toLowerCase();var l=c.getComputedStyle(e,null);l&&(s=l.getPropertyValue(t))}else if(e.currentStyle){if("opacity"===t&&i.browser.msie){var u=e.currentStyle.filter;return u&&u.indexOf("opacity=")>=0?parseFloat(u.match(/opacity=([^)]*)/)[1])/100+"":"1"}var d=t.replace(/\-(\w)/g,(function(e,t){return t.toUpperCase()}));"auto"===(s=e.currentStyle[t]||e.currentStyle[d])&&(s=0),s=(s+"").split(" "),(0,r.each)(s,(function(t,n){if(!/^\d+(px)?$/i.test(n)&&/^\d/.test(n)){var r=e.style,o=r.left,i=e.runtimeStyle.left;e.runtimeStyle.left=e.currentStyle.left,r.left=n||0,s[t]=r.pixelLeft+"px",r.left=o,e.runtimeStyle.left=i}})),s=s.join(" ")}if(n&&("width"===t||"height"===t)){var p=ue(e,!0)[{width:0,height:1}[t]];s=((0,r.intval)(s)?Math.max((0,r.floatval)(s),p):p)+"px"}return s}function be(e,t,n){if(e=_(e))if((0,r.isObject)(t))(0,r.each)(t,((t,n)=>be(e,t,n)));else if("opacity"===t)i.browser.msie&&((n+"").length?e.style.filter=1!==n?"alpha(opacity="+100*n+")":"":e.style.cssText=e.style.cssText.replace(/filter\s*:[^;]*/gi,""),e.style.zoom=1),e.style.opacity!==n&&(e.style.opacity=n);else try{var o="number"==typeof n;o&&/height|width/i.test(t)&&(n=Math.abs(n)),n=o&&!/z-?index|font-?weight|opacity|zoom|line-?height/i.test(t)?n+"px":n,e.style[t]!==n&&(e.style[t]=n)}catch(e){(0,a.debugLog)("setStyle error: ",[t,n],e)}}function Ce(e,t,n){if(!e)return!1;var r=e[vkExpand];return r||(r=e[vkExpand]=++vkUUID),void 0!==n&&(vkCache[r]||(vkCache[r]={},window.__debugMode&&(vkCache[r].__elem=e)),vkCache[r][t]=n),t?vkCache[r]&&vkCache[r][t]:r}function Se(e,t,n){return e=_(e),void 0===n?e.getAttribute(t):(e.setAttribute(t,n),n)}function Te(e){for(var t=0,n=arguments.length;t<n;++t){var r=arguments[t];if(void 0!==e[r])try{delete e[r]}catch(t){try{e.removeAttribute(r)}catch(e){}}}}function Ae(e,t){var n=!!e&&e[vkExpand];if(n)if(t){if(vkCache[n]){delete vkCache[n][t],t="";var r=0;for(var i in vkCache[n])if("__elem"!==i){r++;break}r||Ae(e)}}else(0,o.removeEvent)(e),Te(e,vkExpand),delete vkCache[n]}function De(){for(var e=arguments,t=0;t<e.length;++t){var n=_(e[t]);n&&(Ae(n),Te(n,"btnevents"))}}function Pe(e,t,n){if((e=_(e))&&!e.titleSet){if(t||(t=e),t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight)e.setAttribute("title",n||e.innerText||e.textContent);else{var r=h("b",e);r&&(r.scrollWidth>r.clientWidth||r.scrollHeight>r.clientHeight)?e.setAttribute("title",n||e.innerText||e.textContent):e.removeAttribute("title")}e.titleSet=1}}function Oe(){var e=_("zoom_test_1")||document.body.appendChild(C("div",{id:"zoom_test_1"},{left:"10%",position:"absolute",visibility:"hidden"}));return(_("zoom_test_2")||document.body.appendChild(C("div",{id:"zoom_test_2"},{left:e.offsetLeft+"px",position:"absolute",visibility:"hidden"}))).offsetLeft/e.offsetLeft}function Ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(e=_(e))return void 0!==t&&(e.setValue?(e.setValue(t),!n&&e.phonblur&&e.phonblur()):"INPUT"===e.tagName||"TEXTAREA"===e.tagName?e.value=t:void 0!==e.emojiId&&window.Emoji?Emoji.val(e,t):e.innerHTML=t,!n&&(0,o.triggerEvent)(e,"valueChanged")),e.getValue?e.getValue():("INPUT"===e.tagName||"TEXTAREA"===e.tagName?e.value:e.innerHTML)||""}function ke(e,t,n){e=_(e);try{if(e.focus(),void 0!==t&&!1!==t||(t=e.value.length),void 0!==n&&!1!==n||(n=t),e.setSelectionRange)e.setSelectionRange(t,n);else if(window.getSelection&&document.createRange){var r=document.createRange();r.selectNodeContents(e),r.collapse(!1);var o=window.getSelection();o.removeAllRanges(),o.addRange(r)}}catch(e){}}function Re(e,t,n){for(e=_(e),n=n||999;e&&!t(e);){if(0===--n)return!1;try{if((e=x(e))===document)return!1}catch(t){e=!1}}return e}window.cssTransformProp=function(){var e=document.createElement("div");if(null==e.style.transform){var t=["Webkit","Moz","ms"];for(var n in t)if(void 0!==e.style[t[n]+"Transform"])return t[n]+"Transform"}return"transform"}();var Me=!1;function Le(e){if(!Me)return window.document.title=(0,r.replaceEntities)(e)}function xe(e){Me=e,e&&window.cur&&window.cur.destroy.push((()=>{xe(!1)}))}function Ne(){window.vkExpand=window.vkExpand||"VK"+(0,r.vkNow)(),window.vkUUID=window.vkUUID||0,window.vkCache=window.vkCache||{}}var Be=C},49535:(e,t,n)=>{"use strict";n.d(t,{KEY:()=>a,getDigitByKeyCode:()=>s,addEvent:()=>c,removeEvent:()=>l,triggerEvent:()=>u,cancelEvent:()=>d,stopEvent:()=>_,normEvent:()=>h,checkEvent:()=>f,checkKeyboardEvent:()=>m,checkOver:()=>v});n(530522),n(751876);var r=n(315544),o=n(695724),i=n(726271),a={LEFT:37,UP:38,RIGHT:39,DOWN:40,DEL:8,TAB:9,RETURN:13,ENTER:13,ESC:27,PAGEUP:33,PAGEDOWN:34,SPACE:32,CTRL:17,ALT:18,SHIFT:16};function s(e){return e>=49&&e<=57&&e-48}function c(e,t,n,i,a,s){if((e=(0,r.ge)(e))&&3!=e.nodeType&&8!=e.nodeType){var c,l=a?((c=function(e){var t=e.data;e.data=a;var r=n.apply(this,[e]);return e.data=t,r}).handler=n,c):n;e.setInterval&&e!==window&&(e=window);var u=(0,r.data)(e,"events")||(0,r.data)(e,"events",{}),d=(0,r.data)(e,"handle")||(0,r.data)(e,"handle",function(e){return function(){p.apply(e,arguments)}}(e));(0,o.each)(t.split(/\s+/),(function(t,n){u[n]||(u[n]=[],!i&&e.addEventListener?e.addEventListener(n,d,s):!i&&e.attachEvent&&e.attachEvent("on"+n,d)),u[n].push(l)}))}}function l(e,t,n,i){if(void 0===i&&(i=!1),e=(0,r.ge)(e)){var a=(0,r.data)(e,"events");if(a)if("string"==typeof t)(0,o.each)(t.split(/\s+/),(function(t,s){if((0,o.isArray)(a[s])){var c=a[s].length;if((0,o.isFunction)(n)){for(var l=c-1;l>=0;l--)if(a[s][l]&&(a[s][l]===n||a[s][l].handler===n)){a[s].splice(l,1),c--;break}}else{for(var u=0;u<c;u++)delete a[s][u];c=0}c||(e.removeEventListener?e.removeEventListener(s,(0,r.data)(e,"handle"),i):e.detachEvent&&e.detachEvent("on"+s,(0,r.data)(e,"handle")),delete a[s])}})),(0,o.isEmpty)(a)&&((0,r.removeData)(e,"events"),(0,r.removeData)(e,"handle"));else for(var s in a)a.hasOwnProperty(s)&&l(e,s)}}function u(e,t,n,i){e=(0,r.ge)(e);var a=(0,r.data)(e,"handle");if(a){var s=()=>a.call(e,(0,o.extend)(n||{},{type:t,target:e}));i?s():setTimeout(s,0)}}function d(e){if(!(e=e||window.event))return!1;for(;e.originalEvent;)e=e.originalEvent;return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),e.cancelBubble=!0,e.returnValue=!1,!1}function _(e){if(!(e=e||window.event))return!1;for(;e.originalEvent;)e=e.originalEvent;return e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0,!1}function p(e){e=h(e);var t=Array.from(arguments);t[0]=e;var n=(0,r.data)(this,"events");if(n&&"string"==typeof e.type&&n[e.type]&&n[e.type].length){var o=(n[e.type]||[]).slice();for(var i in o)if(o.hasOwnProperty(i)){if("mouseover"===e.type||"mouseout"===e.type){for(var a=e.relatedElement;a&&a!==this;)a=a.parentNode;if(a===this)continue}var s=o[i].apply(this,t);if(!1!==s&&-1!==s||d(e),-1===s)return!1}}}function h(e){var t=e=e||window.event;if((e=(0,o.clone)(t)).originalEvent=t,e.target||(e.target=e.srcElement||document),3==e.target.nodeType&&(e.target=e.target.parentNode),!e.relatedTarget&&e.fromElement&&(e.relatedTarget=e.fromElement===e.target),null==e.pageX&&null!=e.clientX){var n=document.documentElement,r=bodyNode;e.pageX=e.clientX+(n&&n.scrollLeft||r&&r.scrollLeft||0)-(n.clientLeft||0),e.pageY=e.clientY+(n&&n.scrollTop||r&&r.scrollTop||0)-(n.clientTop||0)}return!e.which&&(e.charCode||0===e.charCode?e.charCode:e.keyCode)&&(e.which=e.charCode||e.keyCode),!e.metaKey&&e.ctrlKey?e.metaKey=e.ctrlKey:!e.ctrlKey&&e.metaKey&&i.browser.mac&&(e.ctrlKey=e.metaKey),!e.which&&e.button&&(e.which=1&e.button?1:2&e.button?3:4&e.button?2:0),e}function f(e){var t=e||window.event;return t&&("click"===t.type||"mousedown"===t.type||"mouseup"===t.type)&&(t.which>1||t.button>1||t.ctrlKey||t.shiftKey||i.browser.mac&&t.metaKey)||!1}function m(e){if(!(e=h(e))||!e.target)return!1;if(!e.screenX)return!0;var t=(0,r.getSize)(e.target),n=(0,r.getXY)(e.target),o=e.pageX-n[0],i=e.pageY-n[1];return o<-1||o>t[0]+1||i<-1||i>t[1]+1||Math.abs(e.pageX-n[0]-t[0]/2)<1&&Math.abs(e.pageY-n[1]-t[1]/2)<1}function v(e,t){if(!e)return!0;e=e.originalEvent||e,t=t||e.target;var n=e.fromElement||e.relatedTarget;if(!n||n===t||n===t.parentNode)return!0;for(;n!==t&&n.parentNode&&n.parentNode!==bodyNode;)n=n.parentNode;return n!==t}},99392:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(315544),o=n(695724),i=n(49535),a=n(803834),s=n(635429);class c{constructor(e,t){if(this.constructor!==c)throw new Error("ElementTooltip was called without 'new' operator");if(!(e=(0,r.ge)(e))||!e.nodeType)throw new Error("First argument not a DOM element");if((0,r.data)(e,"ett"))return(0,r.data)(e,"ett");if(this._opts=(0,o.extend)({delay:100,offset:[0,0],type:c.TYPE_VERTICAL,id:"",cls:"",width:null,appendToParent:!1,autoAdjustToViewport:!0,autoShow:!0,autoHide:!1,noHideOnClick:!1,arrowSize:"normal",customShow:!1,align:c.ALIGN_CENTER,withCloseButton:!1},t),this._opts.customShow&&(this._opts.autoShow=!1),this._opts.defaultSide||(this._opts.defaultSide=this._opts.type===c.TYPE_VERTICAL?"top":"left"),this._opts.cls+=" eltt_arrow_size_"+this._opts.arrowSize,this._opts.cls+=" eltt_align_"+this._opts.align,this._opts.noBorder&&(this._opts.cls+=" eltt_noborder"),this._opts.setPos&&!this._opts.forceSide)throw new Error("forceSide parameter should be set if you use setPos");if(this._appendToEl=this._opts.appendTo?this._opts.appendTo:this._opts.appendToParent?(0,r.domClosestPositioned)(e,{noOverflow:!0}):e,this._arrowSize={mini:c.ARROW_SIZE_MINI,normal:c.ARROW_SIZE_NORMAL,big:c.ARROW_SIZE_BIG}[this._opts.arrowSize],this._opts.forceSide){var n=c.getType(this._opts.forceSide);if(void 0===n)throw new Error("ElementTooltip: invalid 'forceSide' option provided: ",this._opts.forceSide);0,this._opts.type=n}this._opts.type===c.TYPE_HORIZONTAL&&void 0===(null==t?void 0:t.autoAdjustToViewport)&&(this._opts.autoAdjustToViewport=!1),this._el=e,(0,r.data)(this._el,"ett",this),this._initEvents(e),this._clearTimeouts(),this._isShown=!1}_initEvents(e){this._opts.autoShow&&(this._el_me_event=this._onMouseEnter.bind(this),(0,i.addEvent)(e,"mouseenter",this._el_me_event)),(this._opts.autoShow||this._opts.autoHide)&&(this._el_ml_event=this._onMouseLeave.bind(this),(0,i.addEvent)(e,"mouseleave",this._el_ml_event)),this._opts.autoShow||this._opts.customShow||(this._el_c_event=()=>{this._isShown&&this._opts.noHideOnClick||this.toggle(!this._isShown)},(0,i.addEvent)(e,"click",this._el_c_event))}_onMouseEnter(e){clearTimeout(this._hto),this._hto=!1,!this._isShown&&this._opts.autoShow&&(clearTimeout(this._reTimeout),this._reTimeout=!1,clearTimeout(this._sto),this._sto=setTimeout(this.show.bind(this),this._opts.delay))}_onMouseLeave(e){this._clearTimeouts(),this._hto=setTimeout(this._hide.bind(this),200)}_onMouseWindowClick(e){if(!this._opts.noAutoHideOnWindowClick){for(var t=e.target;t&&t!==this._ttel&&t!==document.body&&t!==this._el;)t=(0,r.domPN)(t);if(!(0,r.hasClass)(e.target,"_ap_layer__close"))return t&&t!==document.body?void 0:(0,o.isFunction)(this._opts.onWindowClick)?(this._opts.onWindowClick(),(0,i.cancelEvent)(e)):(this.hide(!0),(0,i.cancelEvent)(e))}}destroy(){var e;this._el_me_event&&(0,i.removeEvent)(this._el,"mouseenter",this._el_me_event),this._el_ml_event&&(0,i.removeEvent)(this._el,"mouseleave",this._el_ml_event),this._el_c_event&&(0,i.removeEvent)(this._el,"click",this._el_c_event),this._clearTimeouts(),(0,r.removeData)(this._el,"ett"),(0,r.re)(this._ttel),this._ev_wclick&&(0,i.removeEvent)(document,"mousedown",this._ev_wclick),this._ttel&&(e=(0,r.geByClass1)("_eltt_content",this._ttel)),this._opts.onDestroy&&this._opts.onDestroy(e)}hide(e){this._hide(e)}_onTooltipMouseEnter(e){this._clearTimeouts()}_onTooltipMouseLeave(e){this._onMouseLeave()}build(){if(!this._ttel){var e=this._opts.withCloseButton?"eltt_with_close_button":"";this._ttel=(0,r.se)(`\n        <div class="eltt ${this._opts.cls||""} ${e}" id="${this._opts.id}">\n          <div class="eltt_arrow_back _eltt_arrow_back">\n            <div class="eltt_arrow"></div>\n          </div>\n          <div class="eltt_content _eltt_content"></div>\n        </div>`),this._ttArrowEl=(0,r.geByClass1)("_eltt_arrow_back",this._ttel);var t=(0,r.geByClass1)("_eltt_content",this._ttel);if(this._opts.content&&((0,o.isString)(this._opts.content)?t.innerHTML=this._opts.content:t.appendChild(this._opts.content)),this._opts.withCloseButton){this._ttel.insertAdjacentHTML("beforeend",'\n          <div class="eltt_close_button"></div>\n        '),this._closeButton=this._ttel.lastElementChild;var n=e=>{e.stopPropagation(),this.hide(),this._opts.onCloseButtonClick&&this._opts.onCloseButtonClick()};this._closeButton.addEventListener("click",n),cur.destroy.push((()=>this._closeButton.removeEventListener("click",n)))}this._appendToEl&&this._appendToEl.appendChild(this._ttel)}}show(){if(this._isShown)this.updatePosition();else{if(this._clearTimeouts(),this._ttel||(this.build(),(this._opts.autoShow||this._opts.autoHide)&&(this._ev_ttenter=this._onTooltipMouseEnter.bind(this),this._ev_ttleave=this._onTooltipMouseLeave.bind(this),(0,i.addEvent)(this._ttel,"mouseenter",this._ev_ttenter),(0,i.addEvent)(this._ttel,"mouseleave",this._ev_ttleave))),this._opts.width){var e=(0,o.isFunction)(this._opts.width)?this._opts.width.call(this):this._opts.width;(0,r.setStyle)(this._ttel,"width",e)}(0,r.show)(this._ttel);var t=(0,r.geByClass1)("_eltt_content",this._ttel);this._opts.onFirstTimeShow&&!this._firstTimeShown&&this._opts.onFirstTimeShow.call(this,t,this._ttel),this._opts.onShow&&this._opts.onShow(t,!this._firstTimeShown),this._firstTimeShown=!0,this.updatePosition(),this._isShown=!0,this._visTO=setTimeout(r.addClass.pbind(this._ttel,"eltt_vis"),10),this._opts.elClassWhenShown&&(0,r.addClass)(this._el,this._opts.elClassWhenShown),this._ev_wclick&&(0,i.removeEvent)(document,"mousedown",this._ev_wclick),this._ev_wclick=this._onMouseWindowClick.bind(this),(0,i.addEvent)(document,"mousedown",this._ev_wclick)}}static getType(e){switch(e){case"top":case"bottom":return c.TYPE_VERTICAL;case"right":case"left":return c.TYPE_HORIZONTAL}}getOptions(){return this._opts}updatePosition(){var e=this._opts.forceSide,t=!!this._opts.getTargetBoundingBox&&this._opts.getTargetBoundingBox(this);if(!t){var n=(0,r.getXY)(this._el),i=(0,r.getSize)(this._el);t={left:n[0],top:n[1],width:i[0],height:i[1]}}var l,u=this._opts.getWrapEl?this._opts.getWrapEl(this):(0,r.gpeByClass)("audio_layer_container",this._ttel),d=u||(0,r.domClosestOverflowHidden)(this._ttel),_=d!==bodyNode?(0,r.getXY)(d):[(0,a.scrollGetX)(),(0,a.scrollGetY)()+(0,s.getPageHeaderHeight)()],p=d!==bodyNode?(0,r.getSize)(d):[window.innerWidth,window.innerHeight],h=(0,r.getSize)(this._ttel),f=this._arrowSize,m=this._opts.noBorder?0:1,v=(0,o.isFunction)(this._opts.offset)?this._opts.offset():this._opts.offset,g=(e,n)=>{var o,i={},a=[vk.rtl?"marginRight":"marginLeft","marginTop"].indexOf(e);o=this._opts.align===(vk.rtl?c.ALIGN_LEFT:c.ALIGN_RIGHT)?h[a]-Math.max(m+f+(n||0),Math.min(h[a],t[a?"height":"width"])/2):this._opts.align===(vk.rtl?c.ALIGN_RIGHT:c.ALIGN_LEFT)?Math.max(m+f+(n||0),Math.min(h[a],t[a?"height":"width"])/2):h[a]/2,i[e]=Math.floor(o)-m-f-(n||0),(0,r.setStyle)(this._ttArrowEl,i)};if(this._opts.setPos)l=this._opts.setPos(this)||{},c.getType(e)===c.TYPE_VERTICAL?void 0!==l.arrowPosition?(0,r.setStyle)(this._ttArrowEl,{marginLeft:l.arrowPosition}):vk.rtl?g("marginRight"):g("marginLeft"):void 0!==l.arrowPosition?(0,r.setStyle)(this._ttArrowEl,{marginTop:l.arrowPosition}):g("marginTop");else{if(!e&&this._prevSide&&this._opts.preventSideChange)e=this._prevSide;else if(!e)if(this._opts.type===c.TYPE_VERTICAL){var y=(0,r.hasClass)(bodyNode,"body_im")?this._opts.bottomGap||60:this._opts.bottomGap||0,E=t.top-_[1]>h[1]+f-v[1],w=(0,a.scrollGetY)()+p[1]-(t.top+t.height+f)-y>h[1];e="top"===this._opts.defaultSide?E?"top":"bottom":w?"bottom":"top"}else e=t.left-_[0]<h[0]?"right":"left";var b,C,S,T,A,D,P=(0,r.getXY)(this._appendToEl),O=[t.left-P[0],t.top-P[1]],I=v[0]+O[0];this._opts.centerShift?(I+=this._opts.centerShift||0,b=this._opts.centerShift):this._opts.rightShift&&(I+=b=-(h[0]/2-this._opts.rightShift)),this._prevSide=e;var k=!this._opts.autoAdjustToViewport;switch(this._opts.align===(vk.rtl?c.ALIGN_LEFT:c.ALIGN_RIGHT)?(C=t.width-h[0],S=t.height-h[1]):this._opts.align===(vk.rtl?c.ALIGN_RIGHT:c.ALIGN_LEFT)?(C=0,S=0):(C=-h[0]/2+t.width/2,S=t.height/2-h[1]/2),e){case"bottom":A=C+I,D=t.height+f-v[1]+O[1],b||k||((T=C+t.left+v[0]+h[0]+20-(_[0]+p[0]))<0&&(T=0),A-=T,b=-T),l={left:A,top:D};break;case"top":A=C+I,D=-h[1]-f+v[1]+O[1],b||k||((T=C+t.left+v[0]+h[0]+20-(_[0]+p[0]))<0&&(T=0),A-=T,b=-T),l={left:A,top:D};break;case"right":A=t.width+f+I,D=S+v[1]+O[1],b||k||((T=S+t.top+v[1]-(_[1]+20))>0&&(T=0),D-=T,b=-T),l={left:A,top:D};break;case"left":A=-h[0]-f+I,D=S+v[1]+O[1],b||k||((T=S+t.top+v[1]-(_[1]+20))>0&&(T=0),D-=T,b=-T),l={left:A,top:D}}this._opts.type===c.TYPE_VERTICAL?vk.rtl?g("marginRight",b):g("marginLeft",b):g("marginTop",b)}(0,o.each)(["top","bottom","left","right"],function(t,n){e!==n&&(0,r.removeClass)(this._ttel,"eltt_"+n)}.bind(this)),(0,r.addClass)(this._ttel,"eltt_"+e),(0,r.setStyle)(this._ttel,l)}_hide(e){if(!this.tempPreventHide){if(this._isShown=!1,this._clearTimeouts(),this._reTimeout=setTimeout(function(){(0,r.hide)(this._ttel),this._opts.elClassWhenShown&&(0,r.removeClass)(this._el,this._opts.elClassWhenShown),this._opts.onHide&&this._opts.onHide(this._ttel,!!e)}.bind(this),c.FADE_SPEED),this._opts.onBeforeHide)try{this._opts.onBeforeHide(this._ttel,!!e)}catch(e){}(0,r.removeClass)(this._ttel,"eltt_vis"),this._ev_wclick&&(0,i.removeEvent)(document,"mousedown",this._ev_wclick)}}isShown(){return this._isShown}toggle(){this.isShown()?this.hide():this.show()}_clearTimeouts(){this._visTO&&clearTimeout(this._visTO),this._visTO=!1,this._sto&&clearTimeout(this._sto),this._sto=!1,this._hto&&clearTimeout(this._hto),this._hto=!1,this._reTimeout&&clearTimeout(this._reTimeout),this._reTimeout=!1}getContent(){return(0,r.geByClass1)("_eltt_content",this._ttel)}}c.TYPE_VERTICAL=0,c.TYPE_HORIZONTAL=1,c.FADE_SPEED=100,c.ARROW_SIZE_MINI=9,c.ARROW_SIZE_NORMAL=8,c.ARROW_SIZE_BIG=16,c.ALIGN_LEFT="left",c.ALIGN_CENTER="center",c.ALIGN_RIGHT="right"},635093:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{menuSettings:()=>menuSettings,showSettingsAddressBox:()=>showSettingsAddressBox,showWriteMessageBox:()=>showWriteMessageBox,giftsBox:()=>giftsBox,moneyTransferBox:()=>moneyTransferBox,reportAd:()=>reportAd,mobilePromo:()=>mobilePromo,showAudioClaimWarning:()=>showAudioClaimWarning,sureDeleteAll:()=>sureDeleteAll,imageStatusPopup:()=>imageStatusPopup});var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(175115),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(59357),_message_box__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(654612),_ui__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(386409),_dom__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(315544),_dom_events__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(49535),_lang__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(786067),_debug_tools__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(787481),_box_utils__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(486125),_shared_lib_web_stats__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(171516),_shared_user_user_env__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(19331),_web_payments_money_transfer__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(962857),_web_settings_addressBox__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(473166);function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}function menuSettings(e){return(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showTabbedBox)("al_settings.php",{act:"menu_box",type:e})}function showSettingsAddressBox(){(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showBox)("al_settings.php",{act:"adress_box"},{stat:[jsc("web/settings.js"),"settings.css"],params:{bodyStyle:"padding: 0;",hideButtons:!0},onDone(e,t){var n=t.hash;(0,_web_settings_addressBox__WEBPACK_IMPORTED_MODULE_12__.initSettingsAddressBox)(n)}})}function showWriteMessageBox(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};cur.onFriendMessage&&cur.onFriendMessage(),stManager.add(["page.js","wide_dd.js"]);var r=(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showBox)("al_im.php",_extends({act:"a_write_box",to:t},n.params),{stat:[jsc("web/writebox.js"),"writebox.css","wide_dd.css","page.css","post.css",jsc("web/emoji.js"),"notifier.css"],cache:1},e);return r&&(0,_dom_events__WEBPACK_IMPORTED_MODULE_5__.cancelEvent)(e),window.WriteBox&&WriteBox.extractEmoji(),!r}function giftsBox(e,t,n){return cur.viewAsBox?cur.viewAsBox():!(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showBox)("al_gifts.php",{act:"box",tab:n||"received",mid:e},{cache:1,stat:["gifts.css",jsc("web/gifts.js")]},t)}function moneyTransferBox(e,t,n,r,o,i,a){if(cur.viewAsBox)return cur.viewAsBox();if(o){var s,c;if(!a)return 2===o?(s=cur.lang&&cur.lang.mail_money_transfer_cancel_confirm||(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("mail_money_transfer_cancel_confirm"),c=cur.lang&&cur.lang.mail_money_transfer_cancel_btn||(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("mail_money_transfer_cancel_btn")):(s=cur.lang&&cur.lang.mail_money_transfer_decline_confirm||(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("news_fb_money_transfer_decline_confirm"),c=cur.lang&&cur.lang.mail_money_transfer_decline_btn||(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("news_fb_money_transfer_decline_btn")),void(cur.confirmBox=(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showFastBox)((0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_action_confirmation"),s,c,moneyTransferBox.pbind(e,t,n,r,o,!1,1),(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_cancel")));var l=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.hasClass)((0,_dom__WEBPACK_IMPORTED_MODULE_4__.domPN)(r),"wall_postlink_preview_btn")||(0,_dom__WEBPACK_IMPORTED_MODULE_4__.hasClass)(r,"money_transfer__decline_button"),u=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass1)("flat_button",(0,_dom__WEBPACK_IMPORTED_MODULE_4__.domPN)(r));return 2!==a&&((0,_ui__WEBPACK_IMPORTED_MODULE_3__.disableButton)(u,!0),l?((0,_dom__WEBPACK_IMPORTED_MODULE_4__.addClass)(r.firstChild,"round_spinner"),(0,_dom__WEBPACK_IMPORTED_MODULE_4__.removeClass)(r.firstChild,"button")):(0,_ui__WEBPACK_IMPORTED_MODULE_3__.lockButton)(r),cur.confirmBox&&cur.confirmBox.hide()),void ajax.post("al_payments.php?act=a_cancel_money_transfer",{tx_id:e,hash:t,from:l?"snippet":""},{onDone:function(i,a,s){0!==i?(l?((0,_dom__WEBPACK_IMPORTED_MODULE_4__.re)(r),(0,_dom__WEBPACK_IMPORTED_MODULE_4__.hasClass)(u,"secondary")||(0,_dom__WEBPACK_IMPORTED_MODULE_4__.domReplaceEl)(u,s)):(0,_dom__WEBPACK_IMPORTED_MODULE_4__.re)((0,_dom__WEBPACK_IMPORTED_MODULE_4__.domPN)(r)),(0,_box_utils__WEBPACK_IMPORTED_MODULE_8__.showDoneBox)(a),window.TopNotifier.invalidate()):setTimeout(moneyTransferBox.pbind(e,t,n,r,o,!1,2),2e3)},onFail:function(e){return(0,_ui__WEBPACK_IMPORTED_MODULE_3__.disableButton)(u,!1),l?((0,_dom__WEBPACK_IMPORTED_MODULE_4__.addClass)(r.firstChild,"button"),(0,_dom__WEBPACK_IMPORTED_MODULE_4__.removeClass)(r.firstChild,"round_spinner")):(0,_ui__WEBPACK_IMPORTED_MODULE_3__.unlockButton)(r),setTimeout((0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showFastBox)((0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_error"),e).hide,2e3),!0}})}return cur.acceptMoneyBtn=r,i?!_web_payments_money_transfer__WEBPACK_IMPORTED_MODULE_11__.MoneyTransfer.showMoneyTransferBox({request_id:e,request:i,hash:t},{stat:["payments.css",jsc("workers/payments.js")]},(e=>((0,_box_utils__WEBPACK_IMPORTED_MODULE_8__.curBox)()&&(0,_box_utils__WEBPACK_IMPORTED_MODULE_8__.curBox)().hide(),setTimeout((0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showFastBox)((0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_error"),e).hide,2e3),!0))):!(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showBox)("al_payments.php",{act:"accept_money_transfer_box",tx_id:e,hash:t},{stat:["payments.css",jsc("workers/payments.js")],onFail:e=>((0,_box_utils__WEBPACK_IMPORTED_MODULE_8__.curBox)()&&(0,_box_utils__WEBPACK_IMPORTED_MODULE_8__.curBox)().hide(),setTimeout((0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showFastBox)((0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_error"),e).hide,2e3),!0),onDone(e,t){_web_payments_money_transfer__WEBPACK_IMPORTED_MODULE_11__.MoneyTransfer.initHandlers(),window.cur=extend(window.cur,{paymentsOptions:t,paymentsPopupWrite(e){e.document.innerHTML!=cur._popup_text&&(e.document.write(window.cur._popup_text),e.document.close(),e.blur(),e.focus(),window.cur._popup_callback&&window.cur._popup_callback())}}),e.setOptions({width:510,bodyStyle:"padding: 0;",hideButtons:!0,onClean(){window.cur.moneyTranferCheckInt&&clearInterval(window.cur.moneyTranferCheckInt),window.removeEventListener("message",_web_payments_money_transfer__WEBPACK_IMPORTED_MODULE_11__.MoneyTransfer.frameMessage,!1)}}),_web_payments_money_transfer__WEBPACK_IMPORTED_MODULE_11__.MoneyTransfer.initAccept(t.chkData,t.frame)}},n)}function reportAd(e,t){if((0,_shared_user_user_env__WEBPACK_IMPORTED_MODULE_10__.partConfigEnabled)("ads_new_reports_web_tgb")){var n="",r=null,o=(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showBox)("/reports.php",{act:"report_ad_box",ad_data:t},{onDone:function(){var e=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("radiobtn","ad_report");window.radioBtns.ad_report={val:0,els:e};var t=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.ge)("ad_csrf");n=t?t.value:n,r=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.ge)("ad_comment")},params:{width:370,onClean:()=>{delete window.radioBtns.ad_report}},stat:["reports.css"]});o.removeButtons(),o.addButton((0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("box_send"),(i=>{ajax.post("reports.php",{act:"a_report_ad",ad_id:e,reason:window.radioBtns.ad_report.val,comment:r?r.value:"",ad_data:t,hash:n},{onDone:()=>{o.hide(),(0,_box_utils__WEBPACK_IMPORTED_MODULE_8__.showDoneBox)((0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("reports_thanks_for_report"))},showProgress:()=>(0,_ui__WEBPACK_IMPORTED_MODULE_3__.lockButton)(i),hideProgress:()=>(0,_ui__WEBPACK_IMPORTED_MODULE_3__.unlockButton)(i)})})),o.addButton((0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_cancel"),!1,"no")}else(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showBox)("/reports.php?act=a_report_ad_box",{ad_id:e},{params:{width:370},stat:["ui_controls.js","ui_controls.css"]})}var mobilePromo=_message_box__WEBPACK_IMPORTED_MODULE_2__.showBox.pbind("al_login.php",{act:"mobile",box:1});function showAudioClaimWarning(e,t,n){var r,o,i=e.id,a=e.ownerId,s=e.title,c=t.id,l=t.reason,u=t.original,d={width:470};if(e.restrictionStatus)return AudioUtils.showAudioRestriction(e);"geo"===l?(r=(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claimed_geo"),o=(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claim_warning_title")):"site_rules_violation"===l?(r=(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_site_rules_violation_warning"),o=(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_site_rules_violation_header")):"replace"===l?(r=(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claimed_replacement_available"),o=(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claim_warning_title")):"subscription"===l?(d.hideButtons=!0,d.bodyStyle="padding: 0; border-radius: 4px;",d.width=450,o=!1,r=`\n      <div class="audio_claim_popup">\n        <div class="audio_claim_popup__title">${(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_audio_only_with_subscription_title")}</div>\n        <div class="audio_claim_popup__text">${(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_audio_only_with_subscription_text")}</div>\n        <div class="audio_claim_popup__close" onclick="curBox().hide()"></div>\n        <button class="flat_button round_button" onclick="AudioPlayer.showSubscriptionPopup()">${(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_audio_only_with_subscription_btn")}</button>\n      </div>`):(r=(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claim_warning"),o=(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claim_warning_title")),d.title=o;var _=[d,r=(r=(r=r.replace(/\{audio\}/g,`<b>${s}</b>`)).replace(/\{objection_link\}/g,`<a href="/help?act=cc_objection&claim=${c}&content=audio${a}_${i}">${(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claim_objection")}</a>`)).replace(/\{delete_link\}/g,`<a onclick="deleteAudioOnClaim(${a}, ${i}); return false;">${(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claim_delete")}</a>`)],p=null;if(n&&u){var h=AudioUtils.drawAudio(u,"no_extra");_[1]=r.replace(/\{original\}/g,u[AudioUtils.AUDIO_ITEM_INDEX_PERFORMER]+" - "+u[AudioUtils.AUDIO_ITEM_INDEX_TITLE])+"<br/><br/>"+h,_.push((0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_replace_with_original"),(function(){(0,_ui__WEBPACK_IMPORTED_MODULE_3__.lockButton)(p.btns.ok[0]),n((()=>p.hide()))})),d.textControls=`<a onclick="deleteAudioOnClaim(${a}, ${i}); return false;">${(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("audio_claim_delete_capital")}</a>`}cur.claimWarning=p=_message_box__WEBPACK_IMPORTED_MODULE_2__.showFastBox.apply(null,_)}function sureDeleteAll(title,text,where,objectId,toId,fromId,hash,event){if(!(0,_dom_events__WEBPACK_IMPORTED_MODULE_5__.checkEvent)(event)){var box=(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showFastBox)({title},text,(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_delete"),(function(btn){ajax.post("/delete_all.php",{act:where,object_id:objectId,to_id:toId,from_id:fromId,hash,loc:nav.objLoc[0]},{onDone:function onDone(res){if(__debugMode)eval(res);else try{eval(res)}catch(e){(0,_debug_tools__WEBPACK_IMPORTED_MODULE_7__.logEvalError)(e,res)}box.hide()},showProgress:_ui__WEBPACK_IMPORTED_MODULE_3__.lockButton.pbind(btn),hideProgress:_ui__WEBPACK_IMPORTED_MODULE_3__.unlockButton.pbind(btn)})}),(0,_lang__WEBPACK_IMPORTED_MODULE_6__.getLang)("global_cancel"));return!1}}function imageStatusPopup(e,t){Object.assign(t,{act:"image_status"});var n=(0,_message_box__WEBPACK_IMPORTED_MODULE_2__.showBox)("special_event.php",t,{containerClass:"ImageStatusPopup__container",params:{hideButtons:!0},onFail:function(){return window.cur.imageStatusBox&&window.cur.imageStatusBox.hide(),!0},onDone:function(e,t){var n=t.status_id;n&&(0,_shared_lib_web_stats__WEBPACK_IMPORTED_MODULE_9__.saveStatlogEvents)({name:"image_status",value:n,keys:["show_popup"]})}},e);n&&((0,_dom_events__WEBPACK_IMPORTED_MODULE_5__.cancelEvent)(e),window.cur.imageStatusBox=n)}},850167:(e,t,n)=>{"use strict";n.d(t,{initTopNotifier:()=>b,isPhotoeditor3Available:()=>C,showPhoto:()=>S,showManyPhoto:()=>T,showAlbums:()=>A,showAlbum:()=>D,showPhotoTags:()=>P,showVideoTags:()=>O,videoCallback:()=>I,showAttachProductBox:()=>k,showWiki:()=>R,showApp:()=>M,showPodcast:()=>L,podcastStartFrom:()=>x,articlePrepare:()=>N,isArticleEditorAvailable:()=>B,openArticleEditor:()=>U,bookmark:()=>F,bookmarkPost:()=>W,bookmarkArticle:()=>V,bookmarkLink:()=>H,bookmarkPodcast:()=>j,bookmarkNarrative:()=>G,bookmarkEvent:()=>q,bookmarkYoulaProduct:()=>Y,shareAudioPlaylist:()=>$,getAudioPlayer:()=>X,deleteAudioOnClaim:()=>Q,initTopAudioPlayer:()=>J,AudioMessagePlayer:()=>Z,mentionClick:()=>ee,isArticleLayerOpen:()=>te,showDonutSubscribePopup:()=>ne,sendCoronaStatusStat:()=>re,sendImageStatusStat:()=>oe});n(21466),n(283946),n(59357),n(820075),n(175115);var r=n(961540),o=n(49535),i=n(695724),a=n(654612),s=n(315544),c=n(726271),l=n(386409),u=n(786067),d=n(668040),_=n(486125),p=n(391789),h=n(479957),f=n(171516),m=n(982452),v=n(273271),g=n(849464),y=n(908928),E=n(221324);function w(){return w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(this,arguments)}function b(){var e=["notifier.js","notifier.css"];return{preload:function(){stManager.add(e,(()=>window.TopNotifier.preload()))},show:function(t){if(!0!==(0,o.checkEvent)(t))return stManager.add(e,(()=>window.TopNotifier.show(t))),(0,o.cancelEvent)(t)},showTooltip:function(t){stManager.add(e,(()=>window.TopNotifier.showTooltip(t)))},invalidate:()=>{},setCount:()=>{},createNewEventsBox:()=>{}}}function C(){return!c.browser.msie||parseInt(c.browser.version)>10}function S(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(r&&r.additional&&r.additional.open_pe&&r.temp&&(0,p.isImgBlurred)(r.temp)){var s=function(){S(e,t,r,a)};Page.showUnblurBox(r.temp.restrictionTitle,r.temp.restrictionText,r.temp.photoRaw,r.temp.unblurHash,s)}else{if(r&&r.additional&&r.additional.open_pe&&r.temp&&r.temp.restrictionGeo&&delete r.additional.open_pe,cur.viewAsBox)return cur.viewAsBox();if(!((0,o.checkEvent)(a)||cur._editMode&&cur._editMode(a))){if((0,v.isUnauthorizedMediaLayerBoxAvailable)()&&!r.forceUnauth)return v.Unauthorized.showMoreBox(null,0,v.UnauthorizedSourceType.PHOTO,(()=>{S(e,t,w({},r,{forceUnauth:!0}),a)})),!1;var c=[jsc("web/photoview.js"),"photoview.css","page.js","page.css"];if(r.img&&(r.showProgress=function(){(0,l.showProgress)(r.img)},r.hideProgress=function(){(0,l.hideProgress)(r.img)}),!e)return!1;var u=1;if(((null==r||null===(n=r.additional)||void 0===n?void 0:n.open_pe)||(null==r?void 0:r.noCache))&&(u=0),window.Photoview&&!1===Photoview.showPhoto(e,t,r)&&u)return!1;var d=!0;if(cur.pvOptions||(cur.pvOptions={}),cur.pvOptions.isLightMode=r.isLightMode,r.temp&&!(cur.pvNoTemp||{})[e]&&stManager.add(c,(function(){(0,i.extend)(cur,{pvCancelLoad:function(){d=!1},pvData:cur.pvData||{},pvOptions:cur.pvOptions||{}}),cur.pvData.temp=[r.temp],cur.pvOptions.temp_final=r.temp_final,cur.pvOptions.temp_summary=r.temp_summary,cur.pvOptions.queue=r.queue,Photoview.show("temp",0)})),(0,i.extend)(r,{onDone:function(n){Photoview.list(e,t,n),r.blog_text&&arguments[3]&&arguments[3][0]&&(arguments[3][0].album=r.blog_text),Photoview.loaded.apply(window,arguments),d&&("deleted"===n?Photoview.showDeleted.apply(window,arguments):Photoview.showPhoto(e,t,r,!0))},stat:c,cache:u}),r.temp_final)return!1;var _="";return nav.objLoc.dmcah&&(_=nav.objLoc.dmcah),ajax.post("al_photos.php",(0,i.extend)({act:"show",gid:cur.gid,photo:e,list:t,dmcah:_,module:cur.module||"",list_info:r.list_info||null},r.additional),r),!1}}}function T(e,t,n,r){Page.showManyPhoto(e,t,n,r)}function A(e,t,n){return cur.viewAsBox?cur.viewAsBox():(0,o.checkEvent)(n)?void 0:(stManager.add([jsc("web/photoview.js"),"photoview.css"],(function(){Photoview.showAlbums(e,t)})),!1)}function D(e,t,n){return cur.viewAsBox?cur.viewAsBox():(0,o.checkEvent)(n)?void 0:(stManager.add([jsc("web/photoview.js"),"photoview.css"],(function(){Photoview.showAlbum(e,t)})),!1)}function P(e,t,n){return cur.viewAsBox?cur.viewAsBox():(0,o.checkEvent)(n)?void 0:(stManager.add([jsc("web/photoview.js"),"photoview.css"],(function(){Photoview.showTagged(e,t)})),!1)}function O(e,t,n){return cur.viewAsBox?cur.viewAsBox():(0,o.checkEvent)(n)?void 0:(stManager.add([jsc("web/video.js"),"video.css",jsc("web/photoview.js"),"photoview.css"],(function(){Photoview.showVideoTags(e,t)})),!1)}function I(e){var t=e.shift();if(window.Videoview&&Videoview.playerCallback[t])return Videoview.playerCallback[t].apply(Videoview,e);throw Error("Unregistered player callback: "+t)}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return curBox()||(0,a.showBox)("al_market.php",{act:"show_attach_product_box"},{onDone:function(e,n){window.MarketProductBox.init(e,n,t)}}),(0,o.cancelEvent)(e)}function R(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if((0,o.checkEvent)(n))return!0;if(0!==cur.gid&&(e.gid=cur.gid),e.location_owner_id=cur.oid,window.wkcur&&wkcur.shown&&wkcur.wkRaw===e.w&&e.w&&!e.reply)return WkView.restoreLayer(r),(0,o.cancelEvent)(n);(window.wkcur&&wkcur.hideTitle||e.hide_title)&&(r.hide_title=e.hide_title=1);var a=r.stat||[jsc("web/wkview.js"),"wkview.css","wk.css",jsc("web/wk.js")];t&&a.push(jsc("web/wk_editor.js"),"wk_editor.css");var s,c,l={stat:a,loader:!r.noloader,onDone:function(e,t,o,a){WkView.show(e,t,(0,i.extend)(o,r),a,n)},onFail:function(e){return(0,i.isFunction)(r.onFail)?r.onFail(e):WkView.showError(e)}};if(nav.objLoc.claim&&(e.claim=nav.objLoc.claim),nav.objLoc.tariff_act&&(e.tariff_act=nav.objLoc.tariff_act),e.w&&"/query"===e.w.substr(-6)){var u=(0,i.clone)(nav.objLoc);delete u[0],delete u.w,e.query=JSON.stringify(u)}r.preload&&(0,i.extend)(l,r.preload),r.ads_params&&(s=r.ads_params,(c=nav.getPostParams(n&&n.target)).post_click_url&&(s._post_click_url=c.post_click_url));var d="";"feed"===cur.module&&window.feed?d=window.feed.getModuleRef():"public"===cur.module?d="club":"profile"===cur.module&&(d="profile"),r.customRef&&(d=r.customRef);var _="",p=(0,i.clone)(nav.objLoc);return p.dmcah&&(_=p.dmcah),ajax.post("wkview.php",(0,i.extend)({act:"show",loc:nav.objLoc[0],is_znav:r.isZnav,dmcah:_,ref:d},e,s,cur.getWkviewOpts&&cur.getWkviewOpts()),l),(0,o.cancelEvent)(n)}function M(e,t,n,r,o,a){a||(a={});var s=!1,c=(0,i.extend)({w:"app"+t},a);if(n=(0,i.intval)(n),r&&((0,i.isObject)(r)?c=(0,i.extend)(c,r):c.ref=r),a.layer&&(s=!0),(cur.apps&&cur.apps[t]||!n)&&!s){delete c.w;var l="app"+t+(o?"_"+o:""),u=nav.objLoc&&!nav.objLoc[1]&&nav.objLoc[0]===l;return nav.go("/"+l+nav.toStr(c),e,{nocur:u})}o&&(c.mid=o);var d={stat:[jsc("web/wkview.js"),"wkview.css","apps.js","apps.css"]};a.queue&&(d.queue=1);var _=cur.module;if(d.onHide=()=>{cur.module=_,a.onHide&&a.onHide()},a.urlHash&&(c.url_hash=a.urlHash),c["#"]){var p=c["#"];delete c["#"],d.onLoaded=()=>{nav.setLoc((0,i.extend)(nav.objLoc,{"#":p}))}}return R(c,!1,e,d)}function L(e,t,n,r,i){if(!vk.widget)return(0,s.show)(boxLoader),(0,s.show)(boxLayerWrap),(0,_.boxRefreshCoords)(boxLoader),stManager.add([jsc("web/podcast.js")],(function(){Podcast.show(e,t,null,r,i)})),n&&(0,o.cancelEvent)(n)}function x(e,t,n,r){return stManager.add([jsc("web/podcast.js")],(function(){Podcast.goToTime(e,t,n,r)})),n&&(0,o.cancelEvent)(n)}function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e&&!vk.isBanned&&stManager.add([jsc("web/article_layer.js"),"article.css"],(function(){window.ArticleLayer.prepare(e,n,t)}))}function B(){return!(c.browser.msie&&parseInt(c.browser.version)<=11)}function U(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(cur.articleEditorLayer)cur.articleEditorLayer.openById(e,t);else{var i=[jsc("web/article_editor_layer.js"),"article.css","article_editor.css"];stManager.add(i,(()=>{}));var s=Object.assign({act:"open_editor",article_owner_id:e,article_id:t,from_post_convert:n?1:0,post_data_medias:n?n.medias.join(","):""},r);ajax.post("al_articles.php",s,{loader:!0,onFail:function(e){return"app"===o.from?o.errorHandler&&o.errorHandler("ServerError: Can't open article editor."):(0,a.showFastBox)((0,u.getLang)("global_error"),e),window.SAKIntegration&&window.SAKIntegration.isIntegrated&&window.SAKIntegration.sendMessage("error",{error:e}),!0},onDone:function(e,t,r,a){window.WkView&&WkView.hide(),window.boxQueue&&boxQueue.hideAll(),n&&(a.postData=n),a.articleOwnerId?stManager.add(i,(function(){if(layers.fullhide=function(){cur.articleEditorLayer&&cur.articleEditorLayer.hide()},window.AuthorPage&&window.AuthorPage.isOpen()&&(cur.needAuthorPageHardBack=!0),cur.articleEditorLayer=new ArticleEditorLayer(e,t,r,a,(()=>delete cur.articleEditorLayer)),"app"===o.from){var n=e=>t=>{t.type=e,"publish"!==e&&"close"!==e||cur.articleEditorLayer&&cur.articleEditorLayer.hide(),o.eventHandler&&o.eventHandler(t)};cur.articleVkAppEditor={onSaveDraft:n("draft"),onPublish:n("publish"),onClose:n("close")}}})):nav.change({z:!1})}})}}function F(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",d=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";ajax.post("al_bookmarks.php",{act:"bookmark",owner_id:e,object_id:t,type:n,state:o?1:0,hash:r,item_access_hash:c,ref:l||cur.module,track_code:d},{onDone:(n,r,o,c)=>{if(n&&!vk.widget){window.showDoneBox(n,{tooltipHandler:function(n){var l=(0,s.geByClass1)("bookmarks_tag_set",n);if(l&&!isEmpty(r)){var d=[];each(r,((e,t)=>{d.push(t)})),d.sort(((e,t)=>e.order-t.order));for(var _='<div class="bookmarks_tags_list">',p=0;p<d.length;p++){var h=d[p];_+=`<div class="bookmarks_tags_list_item" data-id="${h.id}">${h.name}</div>`}_+="</div>",(_=se(_)).addEventListener("click",(n=>{var r=domClosest("bookmarks_tags_list_item",n.target);if(r){var l=(0,s.domData)(r,"id"),d=toggleClass(r,"bookmarks_tags_list_item--selected");ajax.post("al_bookmarks.php",{act:"set_tag",item_type:o,item_oid:e,item_id:t,hash:c,tag_id:l,is_tagged:(0,i.intval)(!d),is_from_snackbar:!0},{onFail:e=>((0,a.showFastBox)((0,u.getLang)("global_error"),e),!0)})}})),cur.setBookmarksTagTooltip&&cur.setBookmarksTagTooltip.destroy(),stManager.add(["ui_common.css","ui_common.js"],(()=>{}));var f=new ElementTooltip(l,{content:_,appendToParent:!0,cls:"bookmarks_tag_set_tt",autoShow:!0,offset:[0,-36],onFirstTimeShow:e=>{stManager.add(["ui_common.css","ui_common.js"],(()=>{cur.setBookmarksTagTooltipScrolls||(cur.setBookmarksTagTooltipScrolls=[]),cur.setBookmarksTagTooltipScrolls.push(new uiScroll(domFC(e),{theme:"dark"}))}))},onShow:function(){Notifier.freezeEvents(),curNotifier.tooltipShown=!0},onHide:function(){curNotifier.tooltipShown=!1,curNotifier.unfreezeAfterTooltipHide&&Notifier.unfreezeEvents()}});cur.destroy.push((()=>{cur.setBookmarksTagTooltipScrolls&&(cur.setBookmarksTagTooltipScrolls.forEach((function(e){e.destroy()})),delete cur.setBookmarksTagTooltipScrolls),f.destroy()}))}},link:"/bookmarks"})}}})}function W(e,t,n,r,o,a){var c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";if((0,i.isObject)(window.cur)&&(0,i.isFunction)(window.cur.viewAsBox))return window.cur.viewAsBox();var l=parseInt((0,s.domData)(e,"state"));e.innerHTML=l?(0,s.domData)(e,"add"):(0,s.domData)(e,"remove"),(0,s.domData)(e,"state",l?0:1),F(t,n,r,o,l,a,c)}function V(e,t,n,r,i,a,c){return t&&(c=parseInt((0,s.domData)(t,"state")),(0,s.domData)(t,"state",c?0:1)),F(n,r,i,a,c),each(geByClass(`_article_${n}_${r}`),((e,t)=>{var n=(0,s.geByClass1)("_bookmark_btn",t);(0,s.domData)(n,"state",c?0:1)})),(0,o.cancelEvent)(e)}function H(e,t,n){var r=parseInt((0,s.domData)(t,"state"));return(0,s.domData)(t,"state",r?0:1),ajax.post("al_bookmarks.php",{act:"bookmark_link",state:r?1:0,hash:n,url:(0,s.domData)(t,"link-url"),img:(0,s.domData)(t,"link-img"),title:(0,s.domData)(t,"link-title"),ref:cur.module,track_code:(0,s.domData)(t,"track-code")},{onDone:e=>{e&&!vk.widget&&window.showDoneBox(e)}}),(0,o.cancelEvent)(e)}function j(e,t,n,r,i){return stManager.add([jsc("web/podcast.js")],(function(){Podcast.toggleFave(e,t,n,i)})),r&&(0,o.cancelEvent)(r)}function K(e){return parseInt((0,s.domData)(e,"state"))}function z(e,t){(0,s.domData)(e,"state",t?0:1),e.innerHTML=t?(0,y.getIcon24FavoriteOutline)().icon:(0,E.getIcon24Favorite)().icon}function G(e,t,n,r,i,a){var s=K(t);return z(t,s),F(n,r,i,a,s),s||(0,g.sendNarrativeAnalytic)(g.NarrativeAnalyticEventType.addToBookmarks,{ownerId:n,id:r},window.cur.module),(0,o.cancelEvent)(e)}function q(e,t,n,r){var i=parseInt((0,s.domData)(t,"state"));return(0,s.domData)(t,"state",i?0:1),ajax.post("fave.php",{act:i?"a_delete_group":"a_add_group",gid:n,hash:r},{onDone:(e,t)=>{i||vk.widget||showDoneBox(t)}}),(0,o.cancelEvent)(e)}function Y(e,t,n,r,i,a){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",l=K(t);return z(t,l),F(n,r,i,a,l,s,"",c),(0,o.cancelEvent)(e)}function $(e,t,n,r){return(0,a.showBox)("like.php",{act:"publish_box",object:"audio_playlist"+t+"_"+n,list:r},{stat:["wide_dd.js","wide_dd.css",jsc("web/sharebox.js")]}),(0,o.cancelEvent)(e)}function X(){return window.ap=window.ap||new AudioPlayer,window.ap}function Q(e,t){var n=e+"_"+t,r=(0,s.geByClass1)("_audio_row_"+n);AudioUtils.deleteAudio(r,AudioUtils.getAudioFromEl(r,!0)),cur.claimWarning&&cur.claimWarning.hide()}function J(){window.TopAudioPlayer.init()}var Z={loaded:!1,events:{on(e,t){stManager.add("voice_message_player.js",(()=>{window.AudioMessagePlayer.events.on(e,t)}))}},togglePlay:function(e){stManager.add("voice_message_player.js",(()=>{window.AudioMessagePlayer.togglePlay(e)}))},toggleTranscript:function(e){stManager.add("voice_message_player.js",(()=>{window.AudioMessagePlayer.toggleTranscript(e)}))},detachPlayer:function(e){stManager.add("voice_message_player.js",(()=>{window.AudioMessagePlayer.detachPlayer(e)}))}};function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e&&e.tt&&e.tt.hide&&e.tt.hide({fasthide:1});var o=e,a=!1;if(te()&&ArticleLayer.isStandalone()&&(a=!0),o.tagName&&"a"===o.tagName.toLowerCase()&&!o.getAttribute("target")&&!nav.baseBlank){var s,c=o.getAttribute("hrefparams");c&&(n.params=(0,i.extend)(n.params||{},(0,d.fromQueryString)(c))),(o=(o=o.href||"").replace(/^https?:\/\//i,"")).indexOf(location.hostname)||(o=o.replace(location.hostname,"")),((o=o.replace(new RegExp(`^${r.VK_HOST_REGEX_UNSAFE.source}/`),"/")).match(/#$/)||!(s=o.match(/^\/(.*?)(\?|#|$)/))||(s=s[1]).indexOf(".php")>0||s.match(/^(doc\-?\d+_\d+|graffiti\d+|reg\d+|images|utils|\.js|js\/|\.css|css\/)/))&&(a=!0)}if(a){var l=!!(n&&n.params&&n.params._post&&n.params._post_click_type);if(!l)return!0;e.setAttribute("data-change-location-with-post-away",1),o=e}return nav.go(o,t,n)}function te(){return window.ArticleLayer&&window.ArticleLayer.isShown()}function ne(e,t,n,r,s){var c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";if(n||l){var u=`donut_payment${n}`,d=r,_=(0,a.showBox)("al_donut.php",w({act:"subscribe_popup",ownerId:n,ownerDomain:l,source:r,hash:s,type:c.type},c.params),{stat:["donut_subscribe_popup.css",window.jsc("web/donut_subscribe_popup.js")],params:{width:450,hideButtons:!0,containerClass:"DonutSubscribePopup",onDestroy:()=>{if(window.DonutSubscribePopup&&window.DonutSubscribePopup.onDestroy(),!c.fromSnippet){(0,o.removeEvent)(window,"popstate",p);var e=nav.objLoc,t=e.w,n=e.source;t===u&&d===n&&(delete nav.objLoc.w,delete nav.objLoc.source,nav.setLoc(nav.objLoc))}}},onDone:(e,t)=>{if(window.DonutSubscribePopup.init({ownerId:n||t.owner_id,source:r,type:c.type,onSuccessPayment:c.onSuccessPayment},e,t),!c.fromSnippet&&"subscribe"===c.type){(0,o.addEvent)(window,"popstate",p);var a=(0,i.extend)(nav.objLoc,{w:u,source:r});nav.setLoc(a)}},onFail:e=>{if(e&&"string"==typeof e)return"group_doesnt_exists"===e&&c.onFailCallback&&"function"==typeof c.onFailCallback?(c.onFailCallback(),_.hide(),!0):(_.hide(),(0,m.showErrorBox)(e),!0)}},t);(0,o.cancelEvent)(t)}function p(){_.hide()}}function re(){(0,h.statlogsValueEvent)("corona_status_stat","open_app")}function oe(e){e&&(0,f.saveStatlogEvents)({name:"image_status",value:e,keys:["popup_action"]})}},998312:(e,t,n)=>{"use strict";n.d(t,{mobileOnlineTip:()=>s,pageVerifiedTip:()=>c,audioShowActionTooltip:()=>l,mentionOver:()=>u,bookmarkTooltip:()=>d,showCovidStatusTooltip:()=>_});n(21466);var r=n(376852),o=n(315544),i=n(479957),a=n(19331);function s(e,t){var n=t.asrtl?0:t.right?289:35,o=t.asrtl?" mobile_tt_asrtl":t.right?" mobile_tt_right":"";return(0,r.showTooltip)(e,{url:"al_login.php",params:{act:"mobile_tt",mid:t.mid,was:t.was},slide:15,ajxdt:200,showdt:200,hidedt:200,forcetoup:t.forcetoup,toup:!1,dir:"auto",asrtl:t.asrtl,appendParentCls:t.appendParentCls,shift:[n,8,7],className:"mobile_tt"+o})}function c(e,t){return(0,r.showTooltip)(e,{url:"/al_page.php",params:{act:"verified_tt",type:t.type,oid:t.oid,force_new_tab:t.forceNewTab?1:0},slide:15,ajxdt:200,showdt:200,hidedt:200,dir:"auto",shift:[95,5,7],className:"verified_tt"})}function l(e,t,n){if(!cur._addRestoreInProgress){var i=(0,o.gpeByClass)("_audio_row",e),a=AudioUtils.getAudioFromEl(i,!0);if(a){var s=(0,o.domData)(e,"action"),c=AudioUtils.getRowActionName(s,a,i),l={text:()=>c,black:1,shift:t||[7,4,0],needLeft:!0,forcetodown:n,noZIndex:!0};each(["_im_mess_stack","top_notify_wrap","_ape_audio_item","wk_history_audio_content"],(function(t,n){if((0,o.gpeByClass)(n,e))return l.appendParentCls=n,!1})),(0,o.gpeByClass)("_im_mess_stack",e)&&(l.shift=[7,10,0],l.noZIndex=!0);var u=e.closest(".CatalogBlock");u&&(l.appendEl=u),(0,r.showTooltip)(e,l)}}}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,a.partConfigEnabled)("mail_history_mention_popover")||"im"!==window.cur.module||window.TopNotifier.shown()||window.layers.visible)(0,r.showTooltip)(e,{url:"al_wall.php",params:{act:"mention_tt",mention:e.getAttribute("mention_id"),from:"wall"},shift:t.shift||[52,7,7],hidedt:t.hidedt||500,showdt:500,needLeft:t.needLeft,slide:15,checkLeft:!0,reverseOffset:t.reverseOffset||112,dir:"auto",appendEl:t.appendEl||(0,o.domClosest)("im-page-history-w",e)||(0,o.domClosest)("rb_box_wrap",e)||(0,o.domClosest)("wk_cont",e)||(0,o.domClosest)("scroll_fix_wrap",e)});else{var n,i=e.getAttribute("mention_id").match(/^(id|club)(\d+)$/);if(!i)return;switch(i[1]){case"id":n=parseInt(i[2],10);break;case"club":n=-parseInt(i[2],10)}if(!n)return;window.reforgedME&&window.reforgedME.profileInfo&&window.reforgedME.profileInfo.mountProfileInfo({peerId:n,targetElement:e})}}function d(e){var t="";(0,o.gpeByClass)("_im_mess_stack",e)?t="_im_mess_stack":(0,o.gpeByClass)("wall_text",e)&&(t="scroll_fix_wrap"),(0,r.showTooltip)(e,{className:"bookmarks_tt ",shift:[32,8],text:()=>"1"===(0,o.domData)(e,"state")?(0,o.domData)(e,"remove"):(0,o.domData)(e,"add"),black:1,appendParentCls:t})}function _(e,t){(0,r.showTooltip)(e,{text:t,dir:"up",forcetodown:!0,hidedt:300,hasover:!0,center:!0,shift:[-2,6],onShowStart:()=>(0,i.statlogsValueEvent)("corona_status_stat","show_tooltip")})}},635676:(e,t,n)=>{"use strict";n.d(t,{Fx:()=>a,animate:()=>s,cubicBezier:()=>c,fadeTo:()=>l,genFx:()=>d,slideDown:()=>_,slideUp:()=>p,slideToggle:()=>h,fadeIn:()=>f,fadeOut:()=>m,fadeToggle:()=>v,getRGB:()=>g,getColor:()=>y,animateCount:()=>E});n(59357),n(66108),n(296253),n(21466);var r=n(695724),o=n(315544),i=n(726271),a={Transitions:{linear:(e,t,n,r)=>n*e/r+t,sineInOut:(e,t,n,r)=>-n/2*(Math.cos(Math.PI*e/r)-1)+t,halfSine:(e,t,n,r)=>n*Math.sin(Math.PI*(e/r)/2)+t,easeOutBack:function(e,t,n,r){var o=1.70158;return n*((e=e/r-1)*e*((o+1)*e+o)+1)+t},easeInCirc:(e,t,n,r)=>-n*(Math.sqrt(1-(e/=r)*e)-1)+t,easeOutCirc:(e,t,n,r)=>n*Math.sqrt(1-(e=e/r-1)*e)+t,easeInQuint:(e,t,n,r)=>n*(e/=r)*e*e*e*e+t,easeOutQuint:(e,t,n,r)=>n*((e=e/r-1)*e*e*e*e+1)+t,easeOutCubic:(e,t,n,r)=>n*((e=e/r-1)*e*e+1)+t,swiftOut:(e,t,n,r)=>n*c(.4,0,.22,1,e/r,4/r)+t},Attrs:[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity","left","top"]],Timers:[],TimerId:null};function s(e,t,n,a){if(e=(0,o.ge)(e)){var s,c=(0,r.isFunction)(a)?a:()=>{},l=(0,r.extend)({},"object"==typeof n?n:{duration:n,onComplete:c}),d={},_={},p=(0,o.isVisible)(e);l.orig={},(t=(0,r.clone)(t)).discrete&&(l.discrete=1,delete t.discrete),i.browser.iphone&&(l.duration=0);var h=(0,o.data)(e,"tween"),f=p?"hide":"show";for(var m in h&&h.isTweening&&(l.orig=(0,r.extend)(l.orig,h.options.orig),h.stop(!1),h.options.show?f="hide":h.options.hide&&(f="show")),t)if(t.hasOwnProperty(m)){if(!h&&("show"===t[m]&&p||"hide"===t[m]&&!p))return l.onComplete.call(this,e);if("height"!==m&&"width"!==m||!e.style||(t.overflow||(void 0===l.orig.overflow&&(l.orig.overflow=(0,o.getStyle)(e,"overflow")),e.style.overflow="hidden"),(0,o.hasClass)(e,"inl_bl")||"TD"===e.tagName||(e.style.display="block")),/show|hide|toggle/.test(t[m]))if("toggle"===t[m]&&(t[m]=f),"show"===t[m]){s=0,l.show=!0,void 0===l.orig[m]&&(l.orig[m]=(0,o.getStyle)(e,m,!1)||"",(0,o.setStyle)(e,m,0));var v=e.style[m];e.style[m]=l.orig[m],t[m]=parseFloat((0,o.getStyle)(e,m,!0)),e.style[m]=v,"height"===m&&i.browser.msie&&!t.overflow&&(e.style.overflow="hidden")}else void 0===l.orig[m]&&(l.orig[m]=(0,o.getStyle)(e,m,!1)||""),l.hide=!0,t[m]=0}return l.show&&!p&&(0,o.show)(e),h=new u(e,l),(0,r.each)(t,(function(t,n){if(/backgroundColor|borderBottomColor|borderLeftColor|borderRightColor|borderTopColor|color|borderColor|outlineColor/.test(t)){if(s=y(e,"borderColor"===t?"borderTopColor":t),n=g(n),void 0===s)return}else{var i=n.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/);i&&(n=parseFloat(i[2]),i[1]&&(n=("-="==i[1]?-1:1)*n+n)),0!=(s=h.cur(t,!0))||"width"!==t&&"height"!==t||(s=1),"opacity"===t&&n>0&&!p&&((0,o.setStyle)(e,"opacity",0),s=0,(0,o.show)(e))}(s!=n||(0,r.isArray)(s)&&s.join(",")===n.join(","))&&(d[t]=s,_[t]=n)})),h.start(d,_),(0,o.data)(e,"tween",h),h}}function c(e,t,n,r,o,i){var a,s,c=function(t){var r=1-t;return 3*r*r*t*e+3*r*t*t*n+t*t*t},l=function(e){var n=1-e;return 3*n*n*e*t+3*n*e*e*r+e*e*e},u=function(t){var r=1-t;return 3*(2*(t-1)*t+r*r)*e+3*(-t*t*t+2*r*t)*n},d=o;for(a=d,s=0;s<8;s++){var _=c(a)-d;if(Math.abs(_)<i)return l(a);var p=u(a);if(Math.abs(p)<1e-6)break;a-=_/p}var h=0,f=1;if((a=d)<h)return l(h);if(a>f)return l(f);for(;h<f;){var m=c(a);if(Math.abs(m-d)<i)return l(a);d>m?h=a:f=a,a=.5*(f-h)+h}return l(a)}function l(e,t,n,r){return s(e,{opacity:n},t,r)}class u{constructor(e,t,n){this.el=(0,o.ge)(e),this.name=n,this.options=(0,r.extend)({onStep:()=>{},onComplete:()=>{},transition:t.transition||a.Transitions.sineInOut,duration:500},t||{})}start(e,t){this.from=e,this.to=t,this.time=(0,r.vkNow)(),this.isTweening=!0;var n=e=>this.step(e);return n.el=this.el,n()&&a.Timers.push(n)&&!a.TimerId&&(a.TimerId=setInterval((function(){for(var e=a.Timers,t=e.length,n=0;n<t;n++)e[n]()||(e.splice(n--,1),t--);t||(clearInterval(a.TimerId),a.TimerId=null)}),13)),this}stop(e){for(var t=a.Timers,n=t.length-1;n>=0;n--)t[n].el===this.el&&(e&&t[n](!0),t.splice(n,1));this.isTweening=!1}step(e){var t=(0,r.vkNow)();if(!e&&t<this.time+this.options.duration){for(var n in this.cTime=t-this.time,this.now={},this.to)if((0,r.isArray)(this.to[n])){for(var i=[],a=0;a<3;a++){if(void 0===this.from[n]||void 0===this.to[n])return!1;i.push(Math.min(parseInt(this.compute(this.from[n][a],this.to[n][a])),255))}this.now[n]=i}else this.now[n]=this.compute(this.from[n],this.to[n]),this.options.discrete&&(this.now[n]=(0,r.intval)(this.now[n]));return this.update(),!0}return setTimeout(this.options.onComplete.bind(this,this.el),10),this.now=(0,r.extend)(this.to,this.options.orig),this.update(),this.options.hide&&(0,o.hide)(this.el),this.isTweening=!1,!1}compute(e,t){var n=t-e;return this.options.transition(this.cTime,e,n,this.options.duration)}update(){for(var e in this.options.onStep(this.now),this.now)(0,r.isArray)(this.now[e])?(0,o.setStyle)(this.el,e,"rgb("+this.now[e].join(",")+")"):void 0!==this.el[e]?this.el[e]=this.now[e]:(0,o.setStyle)(this.el,e,this.now[e])}cur(e,t){return null==this.el[e]||this.el.style&&null!=this.el.style[e]?parseFloat((0,o.getStyle)(this.el,e,t))||0:this.el[e]}}function d(e,t){var n={};return(0,r.each)(a.Attrs.concat.apply([],a.Attrs.slice(0,t)),(function(){n[this]=e})),n}a.Base=u;var _=(e,t,n)=>s(e,d("show",1),t,n),p=(e,t,n)=>s(e,d("hide",1),t,n),h=(e,t,n)=>s(e,d("toggle",1),t,n),f=(e,t,n)=>s(e,{opacity:"show"},t,n),m=(e,t,n)=>s(e,{opacity:"hide"},t,n),v=(e,t,n)=>s(e,{opacity:"toggle"},t,n);function g(e){var t;return e&&(0,r.isArray)(e)&&3==e.length?e:(t=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))?[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]:(t=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))?[2.55*parseFloat(t[1]),2.55*parseFloat(t[2]),2.55*parseFloat(t[3])]:(t=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:(t=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))?[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]:void 0}function y(e,t){var n;do{if(0===(n=(0,o.getStyle)(e,t)).indexOf("rgba")&&(n=""),""!=n&&"transparent"!==n||"body"===e.nodeName.toLowerCase())break;t="backgroundColor",e=e.parentNode}while(e);return g(n)}function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e=(0,o.ge)(e),t=n.str?(0,r.trim)(t.toString())||"":(0,r.positive)(t),e)if(!i.browser.mobile||i.browser.safari_mobile||i.browser.android){var c=(0,o.data)(e,"curCount"),l=(0,o.data)(e,"nextCount");if("number"==typeof l||n.str&&"string"==typeof l)t!=l&&(0,o.data)(e,"nextCount",t);else if("number"==typeof c||n.str&&"string"==typeof c)t!==c&&(0,o.data)(e,"nextCount",t);else if(c=n.str?(0,r.trim)((0,o.val)(e).toString())||"":(0,r.positive)((0,o.val)(e)),"auto"===n.str&&(n.str=!c.match(/^\d+$/)||!t.match(/^\d+$/),n.str||(c=(0,r.positive)(c),t=(0,r.positive)(t))),c!==t){(0,o.data)(e,"curCount",t);var u,d,_=n.str?c.length===t.length?c<t:c.length<t.length:c<t,p=(_?t:c).toString(),h=(_?c:t).toString(),f=[],m=[];for(n.str||(h=new Array(p.length-h.length+1).join("0")+h),u=0,d=p.length;u<d;u++){var v=p.charAt(u);if(v!==h.charAt(u))break;f.push(v)}var g=p.substr(u),y=h.substr(u);if(n.str){for(u=g.length;u>0;u--){var w=g.charAt(u);if(w!==y.charAt(u))break;m.unshift(w)}m.length&&(g=g.substr(0,u+1),y=y.substr(0,u+1))}f=f.join("").replace(/\s$/,"&nbsp;"),m=m.join("").replace(/^\s/,"&nbsp;"),(0,r.trim)((0,o.val)(e))||n.noSpaceIfEmpty||(0,o.val)(e,"&nbsp;");var b=e.clientHeight||e.offsetHeight;(0,o.val)(e,'<div class="counter_wrap inl_bl"></div>');var C,S,T,A,D=e.firstChild,P=!0;f.length&&D.appendChild(C=(0,o.ce)("div",{className:"counter_const inl_bl",innerHTML:f})),f.length||n.allowZero||(y=y.replace(/^0+/,"")),y&&("0"!==y||n.allowZero||f.length)||(y=n.noSpaceIfEmpty?"":"&nbsp;",P=!!f.length),D.appendChild(T=(0,o.ce)("div",{className:"counter_anim_wrap inl_bl"})),T.appendChild(A=(0,o.ce)("div",{className:"counter_anim "+(_?"counter_anim_inc":"counter_anim_dec"),innerHTML:`<div class="counter_anim_big"><span class="counter_anim_big_c">${g}</span></div>`+(P?`<div class="counter_anim_small"><span class="counter_anim_small_c">${y}</span></div>`:"")},P?{marginTop:_?-b:0}:{right:0})),n.str&&(0,o.setStyle)(A,{textAlign:"right",right:0});var O=(0,o.getSize)((0,o.geByClass1)("counter_anim_big_c",A,"span"))[0],I=P?"&nbsp;"===y?O:(0,o.getSize)((0,o.geByClass1)("counter_anim_small_c",A,"span"))[0]:0;!y&&n.noSpaceIfEmpty&&(I=0),m.length&&D.appendChild(S=(0,o.ce)("div",{className:"counter_const inl_bl",innerHTML:m})),n.noWrapWidth||(0,o.setStyle)(D,{width:(C&&(0,o.getSize)(C)[0]||0)+(S&&(0,o.getSize)(S)[0]||0)+O+0}),void 0===i.browser.csstransitions&&(i.browser.csstransitions=i.browser.chrome&&i.browser.version>=9||i.browser.mozilla&&i.browser.version>=4||i.browser.opera&&i.browser.version>=10.5||i.browser.safari&&i.browser.version>=3.2||i.browser.safari_mobile||i.browser.android);var k=i.browser.csstransitions;(0,o.setStyle)(T,{width:_?I:O});var R=function(){(0,o.val)(e,t||(n.noSpaceIfEmpty?"":" "));var r=(0,o.data)(e,"nextCount");(0,o.data)(e,"curCount",!1),(0,o.data)(e,"nextCount",!1),("number"==typeof r||n.str&&"string"==typeof r)&&setTimeout(E.pbind(e,r,n),0),n.onDone&&n.onDone()},M=P?{marginTop:_?0:-b}:{marginRight:_?-I:0};k?((0,o.getStyle)(T,"width"),(0,o.addClass)(T,"counter_css_anim_wrap"),O!==I&&(0,o.setStyle)(T,{width:_?O:I}),P&&(0,o.setStyle)(A,M),setTimeout(R,300),n.fadeMode&&((0,o.setStyle)((0,o.geByClass1)("counter_anim_big",e),"opacity",1),(0,o.setStyle)((0,o.geByClass1)("counter_anim_small",e),"opacity",0))):(O!==I&&s(T,{width:_?O:I},{duration:100}),P?s(A,M,{duration:300,transition:a.Transitions.easeOutCirc,onComplete:R}):setTimeout(R,300))}}else(0,o.val)(e,t||"")}},789466:(e,t,n)=>{"use strict";n.d(t,{onDocumentClick:()=>h,onEnter:()=>f,onCtrlEnter:()=>m,handleGlobalEsc:()=>v,hideCookiesPolicy:()=>g});n(976142),n(21466),n(59357);var r=n(49535),o=n(315544),i=n(695724),a=n(850167),s=n(427909),c=n(726271),l=n(26330),u=n(475632),d=n(668040),_=n(801221),p=n(790008);function h(e){var t,n;if((0,p.processAliExpressMiniAppLinkClickEvent)(e))return!1;if((0,r.checkEvent)(e))return!0;if(l.default.set("last_reloaded",[]),!cur.onMouseClick||!cur.onMouseClick(e)){if(!(e=window.event||e.originalEvent||e))return!0;(null===(t=e.target)||void 0===t||null===(n=t.dataset)||void 0===n?void 0:n.donutLogEvent)&&(0,_.logDonutEvent)(e.target.dataset.donutLogEvent);for(var a,s,c=8,u=e.target||e.srcElement;u&&u!==bodyNode&&"A"!==u.tagName&&c--;)u=u.parentNode;if(!u||"A"!==u.tagName||u.onclick||u.onmousedown)return!0;var h=u.href;if(h&&(u.getAttribute("target")||nav.baseBlank)){if(domClosest("bookmarks_row_type_link",u)){var f=(nav.fromStr(h)||{}).to;statlogsValueEvent("bookmarks_product_analytics",{link_url:f,time:window.getServerTime()})}return!0}if("https:"!==location.protocol&&!h.indexOf("https://"))return!0;(h=h.replace(/^https?:\/\//i,"")).indexOf(location.hostname)||(h=h.replace(location.hostname,""));var m={};(s=h.match(/^\/(.+?)#[\!\/](.+?)$/))&&!s[1].match(/^app(\d+)/)&&(m.permanent=s[1],h="/"+s[2]);var v=!!(u.getAttribute&&u.getAttribute("data-post-click-type")&&u.getAttribute("data-post-id"));if(h.match(/#$/)&&!v)return!0;var g,y=(0,o.domData)(u,"post-id");y&&(m.postId=y);var E=h;if(a=h.match(/^\/(.*?)(\?|#|$)/))a=a[1];else{if(u.hostname)g=u.hostname,a=u.pathname+u.search;else{var w=/^([^:\/]+)?(?::(\d+))?(\/?[^#]*)(#?.*)$/i.exec(h);if(!w)return!0;g=w[1],a=w[3]||"/"}if(!g||!v)return!0;u.setAttribute("data-change-location-with-post-away",1),E=u}if("add_community_app"===a)return(0,o.attr)(u,"target","_blank"),!0;if(a.indexOf(".php")>0||a.match(/^(doc\-?\d+_\d+|graffiti\d+|reg\d+|images\/|utils\/|\.js|js\/|\.css|css\/|source\b)/)){if(!v)return!0;u.setAttribute("data-change-location-with-post-away",1),E=u}var b=u.getAttribute("hrefparams");b&&(m.params=(0,i.extend)(m.params||{},(0,d.fromQueryString)(b)));try{return nav.go(E,e,(0,i.extend)({},m,{throwErrorOnDisabledPath:!0})),(0,r.cancelEvent)(e)}catch(e){return!0}}}function f(e,t){(t=t||window.event).keyCode===r.KEY.ENTER&&(e(),(0,r.cancelEvent)(t))}function m(e,t){(10===(e=e||window.event).keyCode||13===e.keyCode&&(e.ctrlKey||e.metaKey&&c.browser.mac))&&(t(),(0,r.cancelEvent)(e))}function v(e){if(window._wf=1,e.keyCode===r.KEY.ESC&&boxQueue.count()&&!cur._noEscHide)return boxQueue.hideLast(),-1;if(e.keyCode===r.KEY.ESC&&window.articleCloseImageFullSize&&window.articleCloseImageFullSize())return(0,r.cancelEvent)(e);if(e.keyCode===r.KEY.ESC&&window.isArticleLayerOpen&&window.isArticleLayerOpen())return window.ArticleLayer.close(!0),(0,r.cancelEvent)(e);if(e.keyCode===r.KEY.ESC&&window.AuthorPage&&!cur.articleEditorLayer)return window.AuthorPage.close(),(0,r.cancelEvent)(e);if(e.keyCode===r.KEY.ESC)return(0,u.cancelStackPop)(),(0,r.cancelEvent)(e);var t=[176,177,178,179],n=!1;window.audioPlayer&&(t.push(r.KEY.LEFT),t.push(r.KEY.RIGHT)),(0,i.each)(t,(function(t,r){if(e.keyCode===r)return n=!0,!1})),n&&(0,a.getAudioPlayer)().onMediaKeyPressedEvent(e),s.Chat.inited&&191===e.keyCode&&(e.ctrlKey||e.metaKey&&c.browser.mac)&&s.Chat.showFriends()}function g(){(0,o.re)("cookies_policy_wrap"),ajax.post("/settings",{act:"a_hide_cookies_policy"})}},968958:(e,t,n)=>{"use strict";n.d(t,{isWeirdLogging:()=>l,imWeirdLog:()=>u,imWeirdCatch:()=>d,startLoggingAllUnhandled:()=>_,stopLoggingAllUnhandled:()=>p});n(940851),n(296253);var r,o=n(887294),i=n(191040),a=1;function s(e,t,n,o,i){if("Script error."!==e){var a=i?i.stack||i.message:null;u("unhandled_error",a?{err:e,stack:a}:{err:e})}r&&r.apply(this,arguments)}function c(e){e.preventDefault()}function l(){return!!window.imwl}function u(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];l()&&(n&&window.console&&(console.error(e,t),console.trace&&console.trace()),(0,i.retryFn)(o.post,3,(()=>2))("al_im.php",{act:"a_weird_log",kind:e,data:JSON.stringify(extend({errIdx:a++,ua:navigator.userAgent},t))}))}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return u(e,extend({err:t&&t.message||t},n)),Promise.reject(t)}function _(){r=window.onerror,window.onerror=s,window.addEventListener("unhandledrejection",c)}function p(){window.onerror=r,r=void 0,window.removeEventListener("unhandledrejection",c)}},100416:(e,t,n)=>{"use strict";n.d(t,{isInputActive:()=>l,placeholderSetup:()=>d,placeholderInit:()=>_,preventNonNumericalInput:()=>h});n(21466);var r=n(315544),o=n(49535),i=n(635676),a=n(695724),s=n(726271),c=n(19331);function l(){return document.activeElement&&((0,r.attr)(document.activeElement,"contenteditable")||"INPUT"===document.activeElement.tagName||"textarea"===document.activeElement.tagName)}function u(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,c=e.phshown,l=e.phcont,u=n.back,d=n.editable,_=n.hideBackAfter,p=n.timeout,h=n.phColor,f=void 0===h?"#8C8E91":h,m=n.activeColor,v=void 0===m?"#C0C8D0":m,g=p||0===p?p:100,y=n.period||200;if(t=d?(void 0!==e.textContent?e.textContent:e.innerText)||(0,r.geByTag)("img",e).length:e.value,c&&(u&&t||!u&&(o&&!o.type||t))?((0,r.hide)(l),e.phshown=!1):c||t||!u&&!a||((0,r.show)(l),e.phshown=!0,s.browser.opera&&a&&(e.setAttribute("placeholder",""),e.removeAttribute("placeholder",""))),u&&!t){if(o&&!o.type){var E=_?r.hide.pbind(l.firstChild.firstChild):null;clearTimeout(e.phanim),e.phanim=setTimeout((function(){(0,i.animate)(l.firstChild.firstChild,{color:v},y,E)}),g)}a&&(clearTimeout(e.phanim),_&&(0,r.show)(l.firstChild.firstChild),e.phanim=setTimeout((function(){(0,i.animate)(l.firstChild.firstChild,{color:f},y)}),g))}}function d(e,t){var n=(0,r.ge)(e);if(!n)return!1;if(!(n.getAttribute?n.getAttribute("contenteditable"):n.contenteditable)&&(0,c.partConfigEnabled)("native_placeholder_enable"))return!1;var i=t?(0,a.clone)(t):{};if(!n.phevents||i.reload){var l=n.getAttribute?n.getAttribute("placeholder"):n.placeholder;if(l){n.removeAttribute("placeholder");var d={},_=!1,p=["Top","Bottom","Left","Right"];if(i.pad)d=i.pad;else{if(i.fast){for(var h=0;h<4;h++)d["padding"+p[h]]=3,d["margin"+p[h]]=0,d["border"+p[h]+"Width"]=1;(0,a.extend)(d,i.styles||{})}else{for(var f=[],m=0;m<4;m++)f.push("margin"+p[m]),f.push("padding"+p[m]),f.push("border"+p[m]+"Width");d=(0,r.getStyle)(n,f)}for(var v=0;v<4;v++){var g="margin"+p[v],y="border"+p[v]+"Width";d[g]=(0,a.intval)(d[g])+(0,a.intval)(d[y])+"px",delete d[y]}}if(i.reload){var E=n.previousSibling;E&&(0,r.hasClass)(E,"input_back_wrap")&&(0,r.re)(E)}var w=i.big?" big":"",b=(0,r.getSize)(n)[0]-20,C=n.phcont=n.parentNode.insertBefore((0,r.ce)("div",{className:"input_back_wrap no_select",innerHTML:`<div class="input_back"><div class="input_back_content${w}" style="width: ${b}px;">${l}</div></div>`}),n),S=(0,r.domFC)(C);(0,r.setStyle)(S,d);var T=u.pbind(n,i),A=s.browser.mobile?T:(e,t)=>setTimeout(T.pbind(e,t),0);s.browser.msie&&s.browser.version<8&&(0,r.setStyle)(S,{marginTop:1}),n.phonfocus=function(e){_||(n.focused=!0,cur.__focused=n,!0===e&&((0,r.setStyle)(n,{backgroundColor:"#FFF"}),(0,r.hide)(S)),A(!0,!1))},n.phonblur=function(){_||(cur.__focused=n.focused=!1,(0,r.show)(S),A(!1,!0))},n.phshown=!0,n.phanim=null,(n.value||i.editable&&((void 0!==n.textContent?n.textContent:n.innerText)||(0,r.geByTag)("img",n).length))&&(n.phshown=!1,(0,r.hide)(C)),s.browser.opera_mobile||((0,o.addEvent)(C,"focus click",(function(e){_||(i.editableFocus?(setTimeout(i.editableFocus.pbind(n),0),n.phonfocus()):(n.blur(),n.focus()))})),(0,o.addEvent)(n,"focus"+(i.editable?" click":""),n.phonfocus),(0,o.addEvent)(n,"keydown paste cut input",A)),(0,o.addEvent)(n,"blur",n.phonblur),n.check=A,n.getValue=()=>i.editable?n.innerHTML:n.value,n.setPlaceholder=e=>(0,r.geByClass1)("input_back_content",C).textContent=e,n.setDisabled=e=>_=e,n.setValue=function(e){i.editable?n.innerHTML=e:n.value=e,u(n,i)},n.phevents=!0,n.phonsize=function(){},i.global||i.reload||(cur.__phinputs||(cur.__phinputs=[],cur.destroy.push(function(e){for(var t=0,n=e.length;t<n;t++)(0,r.removeData)(e[t])}.pbind(cur.__phinputs))),cur.__phinputs.push(n))}}}function _(e,t){var n=(0,r.ge)(e);if(!n)return!1;if(!(n.getAttribute?n.getAttribute("contenteditable"):n.contenteditable)&&(0,c.partConfigEnabled)("native_placeholder_enable"))return!1;var i=t?(0,a.clone)(t):{},l=void 0===(0,r.ce)("input").placeholder||n&&n.getAttribute&&n.getAttribute("contenteditable");if(!n.phevents||i.reload){var u=n.getAttribute?n.getAttribute("placeholder"):n.placeholder;if(u&&(n.getValue=function(){return i.editable?n.innerHTML:n.value},n.setValue=function(e){i.editable?n.innerHTML=e:n.value=e,l&&f(n,i)},n.phonfocus=function(){},n.phonblur=function(){},l)){if(n.removeAttribute("placeholder"),i.reload){var d=(0,r.domNS)(n);d&&(0,r.hasClass)(d,"placeholder")&&(0,r.re)(d)}var _=n.phcont=(0,r.domInsertAfter)((0,r.ce)("div",{className:"placeholder",innerHTML:'<div class="ph_input"><div class="ph_content">'+u+"</div></div>"}),n),p=f.pbind(n,i),h=s.browser.mobile?p:(e,t)=>setTimeout(p.pbind(e,t),0);n.phonfocus=function(){n.focused=!0,cur.__focused=n,h(!0,!1)},n.phonblur=function(){cur.__focused=n.focused=!1,h(!1,!0)},n.phshown=!0,(n.value||i.editable&&((void 0!==n.textContent?n.textContent:n.innerText)||(0,r.geByTag)("img",n).length))&&(n.phshown=!1,(0,r.hide)(_)),s.browser.opera_mobile||((0,o.addEvent)(_,"focus click contextmenu",(function(e){i.editableFocus?(setTimeout(i.editableFocus.pbind(n),0),"contextmenu"===e.type&&s.browser.msie&&i.editableFocus(n),n.phonfocus()):(n.blur(),n.focus())})),(0,o.addEvent)(n,"focus"+(i.editable?" click":""),n.phonfocus),(0,o.addEvent)(n,"keydown paste cut input",h)),(0,o.addEvent)(n,"blur",n.phonblur),n.check=h,n.phevents=!0,n.phonsize=function(){},i.global||i.reload||(cur.__phinputs||(cur.__phinputs=[],cur.destroy.push((function(){if(cur.__phinputs)for(var e=0,t=cur.__phinputs.length;e<t;++e)(0,r.removeData)(cur.__phinputs[e])}))),cur.__phinputs.push(n))}}function f(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.phshown,i=e.phcont,a=n.editable;a?((t=void 0!==e.textContent?e.textContent:e.innerText)&&s.browser.opera&&t.match(/^[ ]+$/)&&(t=""),t||(t=(0,r.geByTag)("img",e).length>0),t||(t=(0,r.geByTag)("br",e).length>1),t||(t=(0,r.geByTag)("p",e).length>1)):t=e.value,o&&t?((0,r.hide)(i),e.phshown=!1):o||t||((0,r.show)(i),e.phshown=!0)}}var p=e=>{var t=void 0===e.which?e.keyCode:e.which;String.fromCharCode(t).match(/^[0-9]+$/)||(0,o.cancelEvent)(e)},h=e=>{(0,o.addEvent)(e,"keypress",p)}},786067:(e,t,n)=>{"use strict";n.d(t,{parseLatin:()=>s,parseCyr:()=>c,parseLatKeys:()=>l,langNumeric:()=>u,langSex:()=>d,langStr:()=>_,addLangKeys:()=>p,getLang:()=>h,langTag:()=>f,langDate:()=>m,getShortDate:()=>v,getShortDateWithTime:()=>g,getShortDateOrTime:()=>y,langWordNumeric:()=>E,getDateText:()=>w,getBigDateNew:()=>b,getSmDate:()=>C});n(530522),n(59357),n(66108),n(296253),n(751876);var r=n(40906),o=n(289988),i=n(695724),a=n(787481);function s(e){for(var t=["yo","zh","kh","ts","ch","sch","shch","sh","eh","yu","ya","YO","ZH","KH","TS","CH","SCH","SHCH","SH","EH","YU","YA","'"],n=["ё","ж","х","ц","ч","щ","щ","ш","э","ю","я","Ё","Ж","Х","Ц","Ч","Щ","Щ","Ш","Э","Ю","Я","ь"],r=e,o=0,i=t.length;o<i;o++)r=r.split(t[o]).join(n[o]);for(var a="abvgdezijklmnoprstufhcyABVGDEZIJKLMNOPRSTUFHCYёЁ",s=0,c=a.length;s<c;s++)r=r.split(a.charAt(s)).join("абвгдезийклмнопрстуфхцыАБВГДЕЗИЙКЛМНОПРСТУФХЦЫеЕ".charAt(s));return r===e?null:r}function c(e){for(var t=["yo","zh","kh","ts","ch","sch","shch","sh","eh","yu","ya","YO","ZH","KH","TS","CH","SCH","SHCH","SH","EH","YU","YA","'"],n=["ё","ж","х","ц","ч","щ","щ","ш","э","ю","я","Ё","Ж","Х","Ц","Ч","Щ","Щ","Ш","Э","Ю","Я","ь"],r="абвгдезийклмнопрстуфхцыАБВГДЕЗИЙКЛМНОПРСТУФХЦЫеЕ",o=e,i=0;i<n.length;i++)o=o.split(n[i]).join(t[i]);for(var a=0;a<r.length;a++)o=o.split(r.charAt(a)).join("abvgdezijklmnoprstufhcyABVGDEZIJKLMNOPRSTUFHCYёЁ".charAt(a));return o===e?null:o}function l(e){for(var t="qwertyuiop[]asdfghjkl;'zxcvbnm,./`",n=e,r=0;r<t.length;r++)n=n.split(t.charAt(r)).join("йцукенгшщзхъфывапролджэячсмитьбю.ё".charAt(r));return n==e?null:n}function u(e,t,n){if(!t||!window.langConfig){if(!(0,r.isNumeric)(e)){var o=new Error("Non-numeric value passed to langNumeric");throw console.log(e,o),o}return String(e)}var a;if((0,i.isArray)(t)?(a=t[1],e!=Math.floor(e)?a=t[langConfig.numRules.float]:(0,i.each)(langConfig.numRules.int,(function(n,r){if("*"==r[0])return a=t[r[2]],!1;var o=r[0]?e%r[0]:e;return-1!=(0,i.indexOf)(r[1],o)?(a=t[r[2]],!1):void 0}))):a=t,n){for(var s=e.toString().split("."),c=[],l=s[0].length-3;l>-3;l-=3)c.unshift(s[0].slice(l>0?l:0,l+3));s[0]=c.join(langConfig.numDel),e=s.join(langConfig.numDec)}return a=(a||"%s").replace("%s",e)}function d(e,t){if(!(0,i.isArray)(t))return t;var n=t[1];return window.langConfig?((0,i.each)(langConfig.sexRules,(function(r,o){return"*"==o[0]||e==o[0]&&t[o[1]]?(n=t[o[1]],!1):void 0})),n):n}function _(e){for(var t=arguments,n=t.length,r=e+"",o=1;o<n;o+=2){var i="%"===t[o][0]?t[o]:"{"+t[o]+"}";r=r.replace(i,t[o+1])}return r}function p(e,t){var n=t?window:window.cur;n.lang?(0,i.extend)(n.lang,e):n.lang=e}function h(){try{var e=Array.from(arguments),t=e.shift();if(!t)return"...";var n=window.cur&&window.cur.lang&&window.cur.lang[t]||window.lang&&window.lang[t]||window.langpack&&window.langpack[t]||window[t];if(!n){var r=t.split("_");return r.shift(),r.join(" ")}return(0,i.isFunction)(n)?n.apply(null,e):void 0===e[0]&&!(0,i.isArray)(n)||"raw"===e[0]?n:u(e[0],n,e[1])}catch(e){(0,a.debugLog)("lang error:"+e.message+"("+Array.from(arguments).join(", ")+")")}}function f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"tag",o=n;return o=(o=o.replace(`{${r}}`,e)).replace(`{/${r}}`,t)}function m(e,t,n,r,a,s){var c;if(s||(s=""),(0,i.isArray)(t)||(t=["",t,t,t,t]),"number"==typeof e||"string"==typeof e?(e>2147483646e3&&(e=0),e+=n,c=new Date(e)):c=e,a)t=t[1];else{var l="";!(l=(0,o.isToday)(c)?t[3]:(0,o.isYesterday)(c)?t[2]:(0,o.isTomorrow)(c)?t[4]:t[1])&&t[1]&&(l=t[1]),t=l}var u={hours:c.getHours(),minutes:c.getMinutes(),seconds:c.getSeconds(),day:c.getDate(),month:c.getMonth()+1,year:c.getFullYear()},d="";switch(3===vk.lang&&(d=c.getHours()>11?"pm":"am",u.hours=c.getHours()%12==0?12:c.getHours()%12),vk.lang){case 1:switch(c.getHours()){case 11:t=t.replace(" о "," об ");break;case 0:t=t.replace(" о "," в ")}break;case 3:!(0,o.isToday)(c)||(0,o.isYesterday)(c)||(0,o.isTomorrow)(c)||(t=s+t);break;case 12:case 73:1==c.getHours()&&(t=t.replace(" &#224;s "," &#224; "))}return 68===vk.lang&&(u.year=u.year+543),t.replace("{hour}",u.hours).replace("{num_hour}",(0,o.leadingZero)(u.hours)).replace("{minute}",(0,o.leadingZero)(u.minutes)).replace("{day}",u.day).replace("{num_day}",(0,o.leadingZero)(u.day)).replace("{month}",r[u.month]).replace("{year}",u.year).replace("{short_year}",u.year%100).replace("{second}",(0,o.leadingZero)(u.seconds)).replace("{am_pm}",d)}function v(e,t,n,r,o){e*=1e3,void 0===n&&(n=!0),void 0===r&&(r=h("months_of","raw")),t*=1e3;var i=Date.now(),a=new Date(i),s=new Date(e+t);return!o&&e>i&&e-i<864e5&&a.getDate()===s.getDate()?m(e,"{hour}:{minute} {am_pm}",t,[],!n):s.getYear()!==a.getYear()||e<i-157248e5?m(e,h("global_date","raw"),t,r,!n):m(e,h("global_short_date","raw"),t,r,!n)}function g(e,t,n,r){return(0,o.isToday)(new Date(1e3*e+1e3*t))?m(1e3*e,"{hour}:{minute} {am_pm}",1e3*t,[],!n):`${v(e,t,n,r)} ${m(1e3*e,"{hour}:{minute} {am_pm}",1e3*t,[],!n)}`}function y(e,t,n,r){return(0,o.isToday)(new Date(1e3*e+1e3*t))?m(1e3*e,"{hour}:{minute} {am_pm}",1e3*t,[],!n):v(e,t,n,r)}function E(e,t,n){return(0,i.isArray)(t)&&e<t.length?t[e]:u(e,n)}function w(e,t){e+=t;var n=parseInt(Date.now()/1e3)-e,r="";if(n<60)r=h("global_just_now");else if(n<3600){r=E((0,i.intval)(n/60),h("global_word_mins_ago","raw"),h("global_mins_ago","raw"))}else if(n<14400){r=E((0,i.intval)(n/3600),h("global_word_hours_ago","raw"),h("global_hours_ago","raw"))}else r=b(e,0,!0,"_l");return r}function b(e,t,n,r){void 0===n&&(n=!0),void 0===t&&(t=0),void 0===r&&(r=""),t*=1e3;var o=new Date(1e3*e),i=new Date;return o.getFullYear()!==i.getFullYear()&&o.getTime()<i.getTime()-1728e5||Math.abs(o.getTime()-i.getTime())>157248e5?m(1e3*e,h("global_date"+r,"raw"),t,h("months_sm_of"),!n):m(1e3*e,h("global_short_date_time"+r,"raw"),t,h("months_sm_of"),!n)}function C(e,t,n){void 0===n&&(n=!0),void 0===t&&(t=0);var r=new Date,o=r.getFullYear(),i=r.getMonth(),a=new Date(1e3*e),s=a.getFullYear(),c=a.getMonth();return m(1e3*e,h(s<o&&(i>1||c<9||o-s>=2)?"global_date":"global_short_date_time","raw"),t,h("months_sm_of","raw"),!n)}},635429:(e,t,n)=>{"use strict";n.d(t,{getPageHeaderHeight:()=>b,updateNarrow:()=>C,checkPageBlocks:()=>S,redraw:()=>T,onBodyScroll:()=>A,onBodyResize:()=>D,leftBlockOver:()=>P,leftBlockOut:()=>O,leftBlockHide:()=>I,autosizeSetup:()=>k,EcosystemNavigationMenu:()=>R,TopMenu:()=>M,getProgressHtml:()=>L,getProgressBarEl:()=>x});n(991181),n(296253),n(83276),n(59357);var r,o=n(695724),i=n(315544),a=n(803834),s=n(447215),c=n(386409),l=n(778273),u=n(635676),d=n(49535),_=n(363604),p=n(726271),h=n(475632),f=n(850167),m=n(376270),v=n(214547),g=n(813981),y=n(740517),E=n(336680),w=n(19331);function b(){var e=(0,i.ge)("page_header");return r=r||(e?e.offsetHeight:0)}function C(){cur.__narrowBar=cur.__narrowBar||{},cur.__narrowBar.bar=cur.__narrowBar.bar||(0,i.ge)("narrow_column"),cur.__narrowBar.barBlock=cur.__narrowBar.bar&&(0,i.geByClass1)("page_block",cur.__narrowBar.bar),cur.__narrowBar.wideCol=cur.__narrowBar.wideCol||(0,i.ge)("wide_column"),cur.__narrowBar.isBarFixed=cur.__narrowBar.isBarFixed||"fixed"===(0,i.getStyle)(cur.__narrowBar.bar,"position"),cur.__narrowBar.pl=cur.__narrowBar.pl||(0,i.ge)("page_layout");var e=cur.__narrowBar.bar,t=cur.__narrowBar.barBlock,n=cur.__narrowBar.wideCol,r=(0,a.scrollGetY)();if(!p.browser.mobile&&e&&t&&n&&!(0,i.isVisible)(boxLoader)&&!(0,i.isVisible)(boxLayerBG)&&!(0,i.isVisible)(layerBG)){var s,c=window.lastWindowHeight||0,l=Math.min(r,bodyNode.clientHeight-c),u=cur.__narrowBar.pl,d=vk.staticheader?Math.max(0,b()-l):b(),_=cur.__narrowBar.isBarFixed,h=(0,o.floatval)((0,i.getStyle)(cur.__narrowBar.barBlock,"marginTop")),f=(0,i.getSize)(e)[1]-(_?h:0),m=(0,i.getSize)(n)[1],v=(0,i.getXY)(n)[1],g=f>=m-h,y=h,E=l+c-m-v-y,w=Math.max(0,E),C=v-d,S=(0,i.getXY)(e)[1]+(_?h:0),T=cur.__narrowBar.lastSt||0,A=cur.__narrowBar.lastStyles||{},D=d+y+f+h+w<=c&&!cur.narrowHide,P=cur.__narrowBarForceNotFixed,O=!1;l-1<C&&!(D&&p.browser.msie&&S<d+h)||g?s={marginTop:0}:!P&&(l-1<Math.min(T,S-d-h)||D)?(s={top:d,marginLeft:Math.min(-bodyNode.scrollLeft,Math.max(-bodyNode.scrollLeft,bodyNode.clientWidth-(0,i.getSize)(u)[0]))},O=!0):!P&&(l+1>Math.max(T,S+f+y-c)&&E<0&&!cur.narrowHide||cur.narrowHide&&l+1>Math.max(T,S+f-d))?(s={bottom:cur.narrowHide?c-d:y,marginLeft:Math.min(-bodyNode.scrollLeft,Math.max(-bodyNode.scrollLeft,bodyNode.clientWidth-(0,i.getSize)(u)[0]))},O=!0):s={marginTop:E>=0?m-f:Math.min(S-v,m-f+C)},function(e,t){var n=(0,o.clone)(e),r=(0,o.clone)(t);return(0,o.each)(n,(function(e,t){"position"!==e&&(n[e]=Math.round(t))})),(0,o.each)(r,(function(e,t){"position"!==e&&(r[e]=Math.round(t))})),JSON.stringify(n)===JSON.stringify(r)}(s,A)||((0,o.each)(A,(function(e){A[e]=null})),(0,i.setStyle)(e,(0,o.extend)(A,s)),cur.__narrowBar.lastStyles=s),O!==_&&(0,i.toggleClass)(e,"fixed",O),cur.__narrowBar.lastSt=l,cur.__narrowBar.isBarFixed=O}}function S(){var e=(0,i.ge)("content");e&&((0,i.toggleClass)(e,"page_block",!(0,i.geByClass1)("page_block",e)),(0,m.updateAriaElements)())}function T(e,t){e&&"fixed"===(0,i.getStyle)(e,"position")&&(t?(0,i.removeClass)(e,t):(0,i.setStyle)(e,{position:"relative"}),e.offsetLeft,t?(0,i.addClass)(e,t):(0,i.setStyle)(e,{position:"fixed"}))}function A(){if(window.pageNode){var e=Math.min(0,Math.max(-bodyNode.scrollLeft,bodyNode.clientWidth-(0,i.getSize)((0,i.ge)("page_layout"))[0]));p.browser.mobile||vk.staticheader||(0,s.updateHeaderStyles)({marginLeft:e}),(0,s.updateLeftMenu)(),C(),(0,c.updSideTopLink)()}}function D(e){if(window.pageNode){var t=document.documentElement,n=t.clientWidth,r=t.clientHeight,a=(0,c.sbWidth)(),u=Math.max((0,o.intval)(window.innerWidth),(0,o.intval)(n)),d=Math.max((0,o.intval)(window.innerHeight),(0,o.intval)(r)),h=!1;if(p.browser.mobile&&(u=Math.max(u,(0,o.intval)(bodyNode.scrollWidth)),d=Math.max(d,(0,o.intval)(bodyNode.scrollHeight))),window.lastWindowWidth!==u||!0===e){h=!0,window.lastInnerWidth=window.lastWindowWidth=u,layerWrap.style.width=boxLayerWrap.style.width=u+"px";var m=layer.style.width=boxLayer.style.width=u-a-2+"px";if(window.mvLayerWrap&&!mvcur.minimized&&(mvLayerWrap.style.width=u+"px",mvLayer.style.width=m),window.wkLayerWrap&&(wkLayerWrap.style.width=u+"px",wkLayer.style.width=m),bodyNode.offsetWidth<vk.width+a+2&&(u=vk.width+a+2),u)for(var v=pageNode.firstChild;v;v=v.nextSibling)if(v.tagName){for(var g=(window.lastInnerWidth=u-a-1)-1,y=v.firstChild;y;y=y.nextSibling)"scroll_fix"===y.className&&(y.style.width=g+"px");document.documentElement.style.setProperty("--scroll-fixed-width",`${g}px`),vk.staticheader||(0,s.updateHeaderStyles)({width:g})}}if((window.lastWindowHeight!==d||!0===e)&&(h=!0,window.lastWindowHeight=d,layerBG.style.height=boxLayerBG.style.height=layerWrap.style.height=boxLayerWrap.style.height=d+"px",window.mvLayerWrap&&!mvcur.minimized&&(mvLayerWrap.style.height=d+"px"),window.wkLayerWrap)){var E=p.browser.mobile?window.innerHeight:d;wkLayerWrap.style.height=E+"px"}if(vk.noSideTop||(0,c.updSideTopLink)(1),h&&window.curRBox&&window.curRBox.boxes&&window.getWndInner){var w=getWndInner();(0,o.each)(curRBox.boxes,((e,t)=>t._wnd_resize(w[0],w[1])))}setTimeout(l.updSeenAdsInfo,0);var b=(0,f.getAudioPlayer)();b.audioLayer&&b.audioLayer.isShown()&&b.audioLayer.updatePosition(),cur.pvShown&&window.Photoview&&setTimeout(Photoview.updatePhotoDimensions),window.tooltips&&tooltips.rePositionAll(),cur.lSTL&&(0,i.setStyle)(cur.lSTL,{width:Math.max((0,i.getXY)(cur.lSTL.el)[0],0),height:d-1}),(0,i.ge)("dev_top_nav")&&(0,i.setStyle)((0,i.ge)("dev_top_nav","left",null));var S=(0,i.geByClass)("ui_search_fixed"),A=(0,i.ge)("narrow_column");(0,o.each)(S,(function(){T(this,"ui_search_fixed"),setTimeout(T.pbind(this,"ui_search_fixed"),0)})),A&&(T(A,"fixed"),setTimeout(T.pbind(A,"fixed"),0)),(0,s.updateLeftMenu)(),C(),(0,_.updateSTL)()}}function P(e){var t=1;e.id||(e=(0,i.ge)("left_hide"+e),t=0),!t&&e.timer||(e.showing?(0,i.removeAttr)(e,"showing"):((0,u.animate)(e,{opacity:t?1:.5},200),t&&(e.showing=1))),e.timer&&(clearTimeout(e.timer),(0,i.removeAttr)(e,"timer"))}function O(e){var t=.5;e.id||(e=(0,i.ge)("left_hide"+e),t=0),e.timer=setTimeout((function(){(0,u.animate)(e,{opacity:t},200),(0,i.removeAttr)(e,"timer")}),1)}function I(e,t,n){var r={act:"hide_block",block:e,hash:t};n&&(r.block=n),ajax.post("al_index.php",r,{onDone:l.updSeenAdsInfo}),(0,i.hide)("left_block"+e)}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e=(0,i.ge)(e))if(e.autosize)e.autosize.update();else{t.minHeight=(0,o.intval)(t.minHeight)||(0,o.intval)((0,i.getStyle)(e,"height")),t.maxHeight=(0,o.intval)(t.maxHeight);var n=(0,i.getSize)(e)[0]||(0,o.intval)((0,i.getStyle)(e,"width")),r=(0,i.getStyle)(e,"fontSize"),a=(0,i.getStyle)(e,"lineHeight");n<1&&(n=(0,o.intval)((0,i.getStyle)(e,"width",!1))),r.indexOf("em")>0&&(r=(0,o.floatval)(r)*vk.fs),r=(0,o.intval)(r);var s={width:n,height:10,fontFamily:(0,i.getStyle)(e,"fontFamily"),fontSize:r+"px",lineHeight:a,boxSizing:(0,i.getStyle)(e,"boxSizing")},c=["Top","Bottom","Left","Right"];(0,o.each)(c,(function(){s["padding"+this]=(0,i.getStyle)(e,"padding"+this)})),e.autosize={options:t,helper:(0,i.ce)("textarea",{className:"ashelper"},s),handleEvent:function(t,n){var r=n.charCode?String.fromCharCode(n.charCode):n.charCode;if(void 0===r&&(r=String.fromCharCode(n.keyCode),10===n.keyCode||13===n.keyCode?r="\n":!p.browser.msie&&n.keyCode<=40&&(r="")),!r)return t;if(!p.browser.msie)return t.substr(0,e.selectionStart)+r+t.substr(e.selectionEnd);var o=document.selection.createRange();return o.text&&(t=t.replace(o.text,"")),t+r},update:function(t){var n=e.value;!t||"blur"===t.type||"keyup"===t.type||p.browser.msie&&"keypress"!==t.type||t.ctrlKey||t.altKey||t.metaKey||(n=e.autosize.handleEvent(n,t)),n||(n=" "),e.autosize.helper.value!==n&&(e.autosize.helper.value=n);var r=e.autosize.options,s=(0,i.getSize)(e,!0)[1],c=e.autosize.helper.scrollHeight,l=c%a;r.exact&&l>2&&(c-=l-2),c<r.minHeight&&(c=r.minHeight);var u={overflow:"hidden"},d=(0,i.getStyle)(e,"overflow").indexOf("auto")>-1?"auto":"hidden";r.maxHeight&&c>r.maxHeight&&(c=r.maxHeight,(0,o.extend)(u,{overflow:"auto",overflowX:"hidden"})),r.addHeight&&(c+=r.addHeight),s===c&&d===u.overflow||(u.height=c,(0,i.setStyle)(e,u),(0,o.isFunction)(r.onResize)&&r.onResize(c))}},t.exact&&("normal"===a&&(a="120%"),a.indexOf("%")>0&&(a=r*(0,o.intval)(a)/100)),utilsNode.appendChild(e.autosize.helper),p.browser.opera_mobile?((0,i.setStyle)(e,{overflow:"hidden"}),e.autosize.update(),(0,d.addEvent)(e,"blur",e.autosize.update)):((0,d.addEvent)(e,"keydown keyup keypress change",e.autosize.update),setTimeout((()=>{(0,i.setStyle)(e,{overflow:"hidden",resize:"none"});var t=(0,i.val)(e);(0,i.val)(e," ",!0),(0,i.val)(e,t,!0),e.autosize.update()}),0))}}var R={services:[],counters:{},countersInterval:void 0,init:function(){var e=(0,i.ge)("top_ecosystem_navigation_link"),t=(0,i.ge)("top_ecosystem_navigation_menu");if(!e||!t)return!1;(0,w.partConfigEnabled)("vkc_ecosystem_counters")&&(this.fetchCounters(),this.initCountersInterval(),(0,d.addEvent)(document,"visibilitychange",(()=>{"visible"===document.visibilityState?(this.fetchCounters(),this.initCountersInterval()):this.clearCountersInterval()}))),this.loadTrkImages(["https://trk.mail.ru/i/bu5o13"],!0),(0,d.addEvent)(e,"mousedown",R.clicked),this.inited=!0},clearCountersInterval:function(){clearInterval(this.countersInterval)},initCountersInterval:function(){this.countersInterval=setInterval((()=>{this.fetchCounters()}),5*E.MINUTE)},fetchCounters:function(){fetch("https://portal.mail.ru/NaviData?mac=1&ok_counters=1",{credentials:"include"}).then((e=>e.json())).then((e=>this.updateCounters(e))).catch((()=>{this.updateCounters({data:{}}),this.clearCountersInterval()}))},updateCounters:function(e){var t=this._formatCounterResponse(e),n=[...(0,i.domQuery)("[data-id]",(0,i.geByClass1)("top_ecosystem_navigation_services"))],r=0;n.forEach((e=>{var n=(0,i.domData)(e,"id"),o=(0,i.geByClass1)("top_ecosystem_navigation_item_counter",e),a=(0,i.geByClass1)("top_ecosystem_navigation_item_counter_inner",e);o&&a&&(o.style.visibility=t[n]?"visible":"hidden",a.textContent=t[n]||"",r+=Number(t[n])||0)}));var o=(0,i.geByClass1)("top_ecosystem_navigation_item_counter--total");o&&(0,i.toggleClass)(o,"top_ecosystem_navigation_item_counter--badge",r>0)},clicked:function(e){return(0,d.checkEvent)(e)||"mousedown"===e.type&&(0,d.checkKeyboardEvent)(e)||R.toggle(),!1},toggle:function(e){var t,n=(0,i.ge)("top_ecosystem_navigation_link"),r=(0,i.ge)("top_ecosystem_navigation_menu"),o=R.isShown();void 0!==e&&o===e||(void 0===e&&(e=!o),(0,w.partConfigEnabled)("vkc_ecosystem_counters")&&(t=this.services.reduce(((e,t)=>(e.push({name:t.name,int_value:this.counters[t.id]||0}),e)),[])),e?v.vkConnectNavigationCollector.logServiceNavigationOpen(t):v.vkConnectNavigationCollector.logServiceNavigationClose(t),(0,i.toggleClass)(n,"active",e),(0,i.toggleClass)(r,"shown",e),e?((0,h.cancelStackPush)("top_menu",R.toggle.bind(this,!1),!0),cur.introExitTooltipHide&&(cur.introExitTooltipHide(),delete cur.introExitTooltipHide)):(0,h.cancelStackFilter)("top_menu",!0))},show:function(){R.hidetimer&&(clearTimeout(R.hidetimer),R.hidetimer=0),R.toggle(!0)},hide:function(){R.hidetimer||(R.hidetimer=setTimeout((function(){R.toggle(!1),R.hidetimer=0}),200))},select:function(e,t){return!!(0,d.checkEvent)(t)||(R.toggle(!1),nav.go(e,t,{noback:!0}))},isShown:function(){var e=(0,i.ge)("top_ecosystem_navigation_menu");return(0,i.hasClass)(e,"shown")},loadTrkImages:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return(R.isShown()||t)&&e.forEach((function(e){(new Image).src=n?e:e.replace("/c/","/i/")})),!1},goToServices:function(e){v.miniAppsItemStats.logEvent({type:y.EventItemType.OPEN_CATALOG_ECO_MENU}),nav.go("/services",e)},setServices:function(e){this.services=e},getCounterByServiceId:function(e){if(e&&(0,w.partConfigEnabled)("vkc_ecosystem_counters"))return this.counters[Number(e)]||0},_formatCounterValue:function(e){return e>99?"+99":Number(e)},_formatCounterResponse:function(e){return Object.entries(e.data).map((e=>{switch(e[0]){case"mail_cnt":0!==e[1]&&(this.counters[5]=this._formatCounterValue(e[1]));break;case"ok_counters":var t=e[1].friends_count||0;t+=e[1].messages||0,0!==(t+=e[1].presents_count||0)&&(this.counters[7]=this._formatCounterValue(t))}})),this.counters}},M={init:function(){if(this.inited)return!1;var e=(0,i.ge)("top_profile_link"),t=(0,i.ge)("top_profile_menu");if(!e||!t)return!1;(0,d.addEvent)(e,"mousedown",M.clicked),this.inited=!0,(0,g.initColorSchemeDropdowns)()},clicked:function(e){return(0,d.checkEvent)(e)||"mousedown"===e.type&&(0,d.checkKeyboardEvent)(e)||M.toggle(),!1},toggle:function(e){var t,n=(0,i.ge)("top_profile_link"),r=(0,i.ge)("top_profile_menu"),o=(0,i.hasClass)(r,"shown");if(void 0===e||o!==e){void 0===e&&(e=!o);var a=null===(t=(0,i.$)("[data-warning]"))||void 0===t?void 0:t.getAttribute("data-warning");(0,i.hasClass)(r,"top_profile_menu_new")&&(e?v.vkConnectNavigationCollector.logAccountActionsOpen(a):v.vkConnectNavigationCollector.logAccountActionsClose(a)),(0,i.toggleClass)(n,"active",e),(0,i.toggleClass)(r,"shown",e),e?((0,h.cancelStackPush)("top_menu",M.toggle.bind(this,!1),!0),cur.introExitTooltipHide&&(cur.introExitTooltipHide(),delete cur.introExitTooltipHide)):(0,h.cancelStackFilter)("top_menu",!0)}},show:function(){M.hidetimer&&(clearTimeout(M.hidetimer),M.hidetimer=0),M.toggle(!0)},hide:function(){M.hidetimer||(M.hidetimer=setTimeout((function(){M.toggle(!1),M.hidetimer=0}),200))},select:function(e,t){return!!(0,d.checkEvent)(t)||(M.toggle(!1),nav.go(e,t,{noback:!0}))}};function L(e,t){return(0,i.rs)(vk.pr_tpl,{id:e||"",cls:t||""})}function x(e){return(0,i.geByClass1)("ui_progress_bar",e)}},427909:(e,t,n)=>{"use strict";n.d(t,{Chat:()=>f,cssAnim:()=>m,imagesLoader:()=>v,hideNewsAnnounce:()=>y,leftAdBlockClose:()=>E,leftBlockToggleFriend:()=>b,leftBlockFriendTooltip:()=>C,initLegacyBrowserDetectionInAttribute:()=>S,__qlClear:()=>T,storePasswordCredential:()=>A,onLoginDone:()=>D,onLoginFailed:()=>P,onLoginCaptcha:()=>O,onLoginReCaptcha:()=>I,nodeUpdated:()=>k,initPostsLegacyVars:()=>R});n(530522),n(66108),n(296253),n(991181),n(579665),n(95767),n(59357);var r=n(376852),o=n(386409),i=n(315544),a=n(635676),s=n(49535),c=n(695724),l=n(654612),u=n(726271),d=n(786067),_=n(19331);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f={maxHeight:300,tabs:{},counters:{},showFriends:function(){curFastChat.clistBox.visible?curFastChat.clistBox.options.fixed?FastChat.clistHide():curFastChat.clistBox.show():(FastChat.clistShow(),f.cont.tt&&f.cont.tt.destroy&&f.cont.tt.destroy())},showTT:function(){if(!document.querySelector(".WideScreenAppPage")&&!(0,i.hasClass)(f.wrap,"chat_active")&&!(0,i.hasClass)(f.wrap,"chat_expand")){var e=u.browser.mac?"Cmd":"Ctrl";(0,r.showTooltip)(f.cont,{text:`${(0,d.getLang)("head_fr_online_tip")} (${e}+?)`,shift:[-2,4,0],showdt:0,black:1})}},init:function(){f.wrap=(0,i.ce)("div",{id:"chat_onl_wrap",className:"chat_onl_wrap",innerHTML:'\n<div class="chat_tt_wrap"></div>\n<div class="chat_onl_inner">\n  <div class="chat_cont_scrolling"><div class="chat_onl_height"></div></div>\n  <div class="chat_cont_sh_top"></div>\n  <div class="chat_cont_sh_bottom"></div>\n  <a class="chat_tab_wrap" id="chat_tab_wrap" onclick="Chat.showFriends()" onmouseover="Chat.showTT();">\n    <div class="chat_onl_cont">\n      <div class="chat_onl" id="chat_onl"></div>\n    </div>\n  </a>\n</div>'}),utilsNode.appendChild(f.wrap),f.scrollNode=(0,i.geByClass1)("chat_cont_scrolling",f.wrap),f.ttNode=(0,i.geByClass1)("chat_tt_wrap",f.wrap),f.itemsCont=f.scrollNode.firstChild,f.onl=(0,i.ge)("chat_onl"),f.cont=f.onl.parentNode.parentNode,(0,i.hide)(f.wrap),f.inited=!0,stManager._addCss(".layers_shown .chat_onl_wrap {margin-right: "+(0,o.sbWidth)()+"px;}")}};function m(e,t,n,r){var o=(0,c.intval)(u.browser.version);if(e&&(u.browser.chrome&&o>14||u.browser.mozilla&&o>13||u.browser.opera&&o>2)){var l="all "+n.duration+"ms "+(n.func||"ease-out");e.style.WebkitTransition=l,e.style.MozTransition=l,e.style.OTransition=l,e.style.transition=l;var d=function t(){return u.browser.opera&&(0,c.intval)(u.browser.version)<=12?e.removeEventListener("oTransitionEnd",t):(0,s.removeEvent)(e,"webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",t),e.style.WebkitTransition="",e.style.MozTransition="",e.style.OTransition="",e.style.transition="",r&&r(),!1};r&&(u.browser.opera&&(0,c.intval)(u.browser.version)<=12?e.addEventListener("oTransitionEnd",d):(0,s.addEvent)(e,"webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",d)),setTimeout(i.setStyle.pbind(e,t),0)}else(0,a.animate)(e,t,(0,c.extend)(n,{onComplete:r}))}function v(e,t){var n=[],r=0,o=null,a=(0,c.extend)({top_load:0,bottom_load:2,load_limit:10,need_load_class:"__need_load",skip_process_load:!1,use_iframe:!1},t),s={};function l(e,t){n[e]&&(--r,delete n[e]),t||s.processLoad()}function u(t){var n=0,r=t;if(r&&r.offsetParent)do{if(n+=r.offsetTop,e&&r.offsetParent===e)break}while(r=r.offsetParent);return n}return s.processLoad=function(){if((0,c.each)(n,((e,t)=>{var r=p(t,2),o=r[0],i=r[1];(i.width||i.height||(0,c.vkNow)()-o>2e4)&&n[e]&&l.call(i,e,!0)})),clearTimeout(o),r&&(o=setTimeout(s.processLoad,500)),!(r>=a.load_limit)){var t,d,_=(0,i.geByClass)(a.need_load_class,e||bodyNode),h=[];if(e&&_.length){var f=e.offsetHeight;t=e.scrollTop-f*a.top_load,d=e.scrollTop+f*a.bottom_load}for(var m=0,v=_.length;m<v&&r<a.load_limit;m++){var g=_[m];if("IMG"===g.tagName){var y=g.getAttribute("data-src");if(y){if(e){var E=u(g),w=E+g.parentNode.offsetHeight;if(E>d)continue;if(w<t)continue}h.push([g,y])}}}(0,c.each)(h,((e,t)=>{var o=p(t,2),u=o[0],d=o[1];s.iloader&&s.iloader.add(d,l,u),u.src=d,u.removeAttribute("data-src"),(0,i.removeClass)(u,a.need_load_class),n[d]||(r++,n[d]=[(0,c.vkNow)(),u])})),clearTimeout(o),r&&(o=setTimeout(s.processLoad,500))}},s.destroy=function(){n=[],r=0,clearTimeout(o)},a.use_iframe&&(s.iloader=new g),a.skip_process_load||s.processLoad(),s}function g(){var e,t,n,r,o,a;function s(e){return t&&t.body?'<img id="___img'+e+'" />':'<img class="___img'+e+'" />'}function l(e){return t&&t.body?t.getElementById("___img"+e):(0,i.geByClass1)("___img"+e,n)}function d(){e=utilsNode.appendChild((0,i.ce)("iframe")),t=function(e){if(u.browser.mozilla)return!1;try{return e.contentDocument?e.contentDocument:e.contentWindow&&e.contentWindow.document?e.contentWindow.document:e.document}catch(e){}return!1}(e),n=t&&t.body?t.body:utilsNode.appendChild((0,i.ce)("div",{},{display:"none"})),r=0,o=[]}function _(e,t,a){var c=r++;o[c]={src:e,onLoad:t,that:a},n.appendChild((0,i.ce)("div",{innerHTML:s(c)}));var u=l(c);return u.src=e,u.onload=function(){var e=o[c];e&&(e.onLoad&&e.onLoad.call(e.that||window,e.src),delete o[c],n.removeChild(l(c).parentNode))},u}return d(),{add:_,abort:function(){(0,i.re)(e),a=[...o.filter((e=>void 0!==e))],d()},repeat:function(e){if(!a)return[];var t=[];if((0,c.each)(a,((e,n)=>{_(n.src,n.onLoad,n.that),t.push(n.that)})),a=null,e){var n=[];(0,c.each)(t,(function(){n.push([this,this.src]),this.src="",(0,i.hide)(this)})),setTimeout((function(){(0,c.each)(n,((e,t)=>{var n=p(t,2),r=n[0],o=n[1];r.src=o,(0,i.show)(r)}))}),10)}return t}}}function y(e,t){var n={act:"hide_block",block:e,hash:t};ajax.post("al_index.php",n),(0,i.hide)("news_announce_"+e)}function E(e,t,n){(0,i.setStyle)("left_hide"+e,{visibility:"hidden"}),(0,_.partConfigEnabled)("ads_new_reports_web_tgb")?function(e,t,n){var r="",a=(0,l.showBox)("reports.php",{act:"hide_ad_box",ad_data:n},{onDone:function(){var e=(0,i.geByClass)("radiobtn","ad_hide");window.radioBtns.ad_hide={val:0,els:e};var t=(0,i.ge)("ad_csrf");r=t?t.value:r},params:{width:370,onClean:()=>{delete window.radioBtns.ad_hide}},stat:["reports.css"]});a.removeButtons(),a.addButton((0,d.getLang)("box_send"),(i=>{(0,o.lockButton)(i),ajax.post("reports.php",{act:"hide_ad",reason_id:window.radioBtns.ad_hide.val,ad_data:n,hash:r}),w(e,t,(()=>{(0,o.unlockButton)(i),a.hide()}))})),a.addButton((0,d.getLang)("global_cancel"),!1,"no")}(e,t,n):w(e,t)}function w(e,t,n){function r(){(0,a.animate)("ads_ad_close_info_"+e,{opacity:1},200,o)}function o(){(0,i.setStyle)("ads_ad_box2_"+e,{visibility:"hidden"})}ajax.post(t,{},{noAds:!0,onDone:function(t){if(!t.done)return;"function"==typeof n&&n();if("ya_direct"===e)return(0,a.animate)(e,{opacity:0},200,(function(){(0,i.re)("ya_direct"),setTimeout((function(){AdsLight.updateBlock("force_hard",2)}),5e3)})),void(window.vk__adsLight.yaDirectAdActive=!1);var o=(0,i.ge)("ads_ad_close_info_"+e);if(!o)return!1;(0,i.setStyle)(o,{opacity:0}),o.style.setProperty("display","block","important"),setTimeout(r,0)}})}function b(e,t,n,r,o){r&&stManager.add(["tooltips.css",jsc("web/tooltips.js")]),cur.mfid=e,ajax.post("al_friends.php",{act:r?"add":"remove",mid:e,mf_type:t,hash:n,from:"leftblock"},{onDone:function(t,n,r){if(!t)return nav.reload();var o=(0,i.ge)("left_friend_status_"+e);(0,i.cleanElems)(o.firstChild),t?((0,i.show)(o),(0,i.val)(o,t)):(0,i.hide)(o),n&&(ajax.preload("al_friends.php",{act:"friend_tt",mid:e},[n,r]),setTimeout(C,0))},showProgress:function(){var t=((0,i.ge)("left_friend_subscribed")||{}).tt;t&&(t.hide({fasthide:1}),t.destroy()),(0,i.ge)("left_friend_status_"+e).innerHTML='<img src="/images/upload'+(window.devicePixelRatio>=2?"_2x":"")+'.gif" width="32" />'},hideProgress:()=>(0,i.hide)("left_friend_status_"+e),onFail:function(e){if(e)return(0,l.showFastBox)({title:(0,d.getLang)("global_error")},e),!0}}),(0,s.cancelEvent)(o)}function C(){return(0,r.showTooltip)((0,i.ge)("left_friend_subscribed"),{url:"al_friends.php",params:{act:"friend_tt",mid:cur.mfid,from:"leftblock"},slide:15,hidedt:500,shift:[40,-1,3],className:"preq_tt",forcetodown:!0})}function S(){var e=[];(0,c.each)(u.browser,(function(t,n){n&&!(0,c.inArray)(t,["version","mac","search_bot"])&&"flash"!==t.substr(0,5)&&e.push(t)})),e=e.join(" "),bodyNode.setAttribute("data-useragent",e)}function T(){clearTimeout(window.__qlTimer),setTimeout((()=>clearTimeout(window.__qlTimer)),2e3)}function A(e){if(u.browserFeatures.cmaEnabled&&window.ResizeObserver&&(0,i.val)("quick_email")&&void 0!==window.PasswordCredential){var t=new PasswordCredential({id:(0,i.ge)("quick_email").value,password:(0,i.ge)("quick_pass").value,name:e.name,iconURL:e.photo_50});navigator.credentials.store(t)}}function D(e,t){T(),A(t),nav.reload({force:!0,from:6})}function P(e,t){switch(T(),e){case-1:location.href=location.href.replace(/^http:/,"https:");break;case 4:var n="/login?m=1"+(t.expire?"&s=0":"");(0,c.each)(["email","ul","pch","to"],(function(e,r){t[r]&&(n+="&"+r+"="+t[r])})),location.href=n;break;case 7:location.href="/login?m=7";break;default:location.href="/login"}}function O(e,t){T(),(0,o.unlockButton)(window.__qfBtn),window.qloginBox=(0,l.showCaptchaBox)(e,t,window.qloginBox,{onSubmit:function(e,t){(0,i.ge)("quick_captcha_sid").value=e,(0,i.ge)("quick_captcha_key").value=t,(0,i.ge)("quick_login_form").submit()},onHide:()=>window.qloginBox=!1})}function I(e,t){T(),(0,o.unlockButton)(window.__qfBtn),window.qloginBox=(0,l.showReCaptchaBox)(e,t,window.qloginBox,{onSubmit:function(e){(0,i.ge)("quick_recaptcha").value=e,(0,i.ge)("quick_login_form").submit()},onHide:()=>window.qloginBox=!1})}function k(e,t){(0,i.setStyle)(e,{backgroundColor:"#F5F7FA"}),(0,a.animate)(e,{backgroundColor:"#FFF"},t||6e3,(function(e){(0,i.setStyle)(e,{backgroundColor:null})}))}function R(){window._postsSeen={},window._postsSaved={},window._postsSaveTimer=void 0,window._postsSendTimer=void 0,window._postsCleanTimer=void 0,window._postsSeenModules={},window._postsExtras={}}},768883:(e,t,n)=>{"use strict";n.d(t,{collectMemoryStats:()=>a,statDurationsLoadImage:()=>s,statNavigationTiming:()=>c});var r=n(460615),o=n(695724);function i(e,t){for(var n,r=0;r<t.length;r++)if(">"===(n=t[r]))n=">"+t[r-1];else{if(1e3*n>e){n="<"+n;break}n=!1}return n}function a(){var e={},t=[15,60,300,1500,5e3,1e4,15e3,2e4,25e3,3e4],n=[300,1500,5e3,3e4,6e4,12e4,">"],o=!1;setInterval((function(){var a=window.cur&&window.cur.module;a!==o&&(e={},o=a);var s=window.vkLastNav;if(a&&s){var c=i(Date.now()-s,t);if(c&&!e[c]){var l=i(Date.now()-window.vkTabLoaded,n);e[c]=!0;var u=performance.memory.usedJSHeapSize;(0,r.statlogsValueEvent)("js_memory_stats_modules",u,a,c,l)}}}),5e3)}function s(){if(Math.random()<.001&&window.performance&&window.performance.getEntriesByType){if(window.clientStatsInited)return!1;var e=window.performance.getEntriesByType("resource");if(!e)return!1;for(var t={},n={},i=0;i<e.length;i++)if(e[i]&&"img"===e[i].initiatorType)if(e[i].duration<100)t["<100"]=(t["<100"]||0)+1;else if(e[i].duration<250)t["100-250"]=(t["100-250"]||0)+1;else if(e[i].duration<500)t["250-500"]=(t["250-500"]||0)+1;else if(e[i].duration<1e3)t["500-1000"]=(t["500-1000"]||0)+1;else if(e[i].duration<2e3)t["1000-2000"]=(t["1000-2000"]||0)+1;else if(e[i].duration<5e3)t["2000-5000"]=(t["2000-5000"]||0)+1;else if(t[">5000"]=(t[">5000"]||0)+1,e[i].name&&e[i].name.indexOf("pp.vk.me")>0){var a="";(a=(a=e[i].name).substr(a.indexOf("pp.vk.me")+9)).indexOf("/")>0&&(n[a=a.substr(0,a.indexOf("/"))]=(n[a]||0)+1)}(0,o.each)(t,((e,t)=>(0,r.statlogsValueEvent)("img_load",t,e))),(0,o.each)(n,((e,t)=>(0,r.statlogsValueEvent)("img_slow",t,e))),window.clientStatsInited=!0}}function c(){if(window.clientStatsInitedNT)return!1;if(window.performance&&performance.timing){if(Math.random()>.001&&!__dev)return!1;var e={},t=window.cur&&window.cur.module;performance.timing.redirectStart&&performance.timing.redirectEnd&&(e.redirect=performance.timing.redirectEnd-performance.timing.redirectStart),performance.timing.domainLookupStart&&performance.timing.domainLookupEnd&&(e.domainLookup=performance.timing.domainLookupEnd-performance.timing.domainLookupStart),performance.timing.connectStart&&performance.timing.connectEnd&&(e.connect=performance.timing.connectEnd-performance.timing.connectStart,performance.timing.secureConnectionStart&&(e.secureConnection=performance.timing.connectEnd-performance.timing.secureConnectionStart)),performance.timing.requestStart&&performance.timing.responseStart&&(e.request=performance.timing.responseStart-performance.timing.requestStart,performance.timing.responseEnd&&(e.response=performance.timing.responseEnd-performance.timing.responseStart)),performance.timing.unloadEventStart&&performance.timing.unloadEventEnd&&(e.unloadEvent=performance.timing.unloadEventEnd-performance.timing.unloadEventStart),performance.timing.domLoading&&performance.timing.domComplete&&(e.processing=performance.timing.domComplete-performance.timing.domLoading),performance.timing.domContentLoadedEventStart&&performance.timing.domContentLoadedEventEnd&&(e.domContentLoadedEvent=performance.timing.domContentLoadedEventEnd-performance.timing.domContentLoadedEventStart),performance.timing.loadEventStart&&performance.timing.loadEventEnd&&(e.loadEvent=performance.timing.loadEventEnd-performance.timing.loadEventStart),performance.timing.loadEventEnd&&performance.timing.responseEnd&&(e.resource=performance.timing.loadEventEnd-performance.timing.responseEnd),(0,o.each)(e,((e,n)=>(0,r.statlogsValueEvent)("navigation_timing",n,e,t))),window.clientStatsInitedNT=!0}}},791963:(e,t,n)=>{"use strict";n.d(t,{default:()=>r});const r=n(98234)},654612:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{MessageBox:()=>MessageBox,showBox:()=>showBox,showTabbedBox:()=>showTabbedBox,showFastBox:()=>showFastBox,showCaptchaBox:()=>showCaptchaBox,showReCaptchaBox:()=>showReCaptchaBox});var core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(66108),core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(296253),core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(175115),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(751876),_ui__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(386409),_debug_tools__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(787481),_dom_events__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(49535),_ui_util__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(159121),_dom__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(315544),_fx__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(635676),_utils_common__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(695724),_lang__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(786067),_shared_lib_convert__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(668040),_box_utils__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(486125),_accessibility__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(376270),_web_helpers_classnames__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(483295),_icons_desktop_getIcon24Cancel__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(420130),_icons_desktop_getIcon24BrowserBack__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(439026),_web_ui_FlatButton__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(124041),_shared_lib_dom__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(830104),_vkontakte_vkjs__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(659397);function MessageBox(_options){var defaults={title:!1,titleControls:"",containerClass:"",width:450,height:"auto",animSpeed:0,bodyStyle:{},grey:!1,white:!1,selfDestruct:!0,progress:!1,hideOnBGClick:!1,hideButtons:!1,onShow:!1,onHideAttempt:!1,onBeforeHide:!1,onHide:!1,onClean:!1,onDestroy:!1,preventHideLastWithCheck:!1,refreshCoordsOnTimeout:!1},options=(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.extend)(defaults,_options),guid=window._message_box_guid++,visible=!1,btns={ok:[],cancel:[]},boxTitleBck,retBox;options.progress||(options.progress="box_progress"+guid);var controlsStyle=options.hideButtons?' style="display: none"':"",boxContainer=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.ce)("div",{className:(0,_web_helpers_classnames__WEBPACK_IMPORTED_MODULE_17__.classNames)("popup_box_container",options.containerClass),innerHTML:`\n<div class="box_layout" onclick="boxQueue.skip=true;">\n  <div class="box_title_wrap">\n    <div class="box_x_button" aria-label="${(0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("global_close")}" tabindex="0" role="button">${(0,_icons_desktop_getIcon24Cancel__WEBPACK_IMPORTED_MODULE_18__.getIcon24Cancel)().icon}</div>\n    <div class="box_title_controls"></div>\n    <div class="box_title"></div>\n  </div>\n\n  <div class="box_body"></div>\n  ${options.noControls?"":`\n  <div class="box_controls_wrap" ${controlsStyle}>\n    <div class="box_controls">\n      <div class="box_controls_buttons fl_r"></div>\n\n      <div class="progress" id="${options.progress}"></div>\n\n      <div class="box_controls_text">${options.textControls||""}</div>\n    </div>\n  <div>`}\n</div>`},{display:"none"});(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(boxContainer);var boxTitleWrap=boxContainer.querySelector(".box_title_wrap"),boxCloseButton=boxTitleWrap.querySelector(".box_x_button"),boxTitle=boxTitleWrap.querySelector(".box_title"),boxTitleControls=boxTitleWrap.querySelector(".box_title_controls");options.noCloseButton&&(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(boxCloseButton);var boxBody=boxContainer.querySelector(".box_body"),boxControlsWrap=boxContainer.querySelector(".box_controls_wrap"),boxButtons,boxProgress,boxControlsText;boxControlsWrap&&(boxButtons=boxControlsWrap.querySelector(".box_controls_buttons"),boxProgress=boxControlsWrap.querySelector(".progress"),boxControlsText=boxControlsWrap.querySelector(".box_controls_text")),boxLayer.appendChild(boxContainer),boxContainer.setAttribute("tabindex",0),boxContainer.focus(),applyBodyStyle(options.bodyStyle),refreshBox(),(0,_box_utils__WEBPACK_IMPORTED_MODULE_13__.boxRefreshCoords)(boxContainer);var emitter=new EventEmitter;function applyBodyStyle(e){if("string"==typeof e)for(var t=e.split(";"),n=0,r=t.length;n<r;n++){var o=t[n].split(":");o.length>1&&o[0].length&&(boxBody.style[(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.trim)(o[0])]=(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.trim)(o[1]),boxBody.style.setProperty&&boxBody.style.setProperty((0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.trim)(o[0]),(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.trim)(o[1]),""))}else(0,_vkontakte_vkjs__WEBPACK_IMPORTED_MODULE_16__.isObject)(e)&&Object.assign(boxBody.style,e)}function refreshBox(){boxTitleBck||(options.title?(boxTitle.innerHTML=options.title,(0,_dom__WEBPACK_IMPORTED_MODULE_8__.removeClass)(boxBody,"box_no_title"),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(boxTitleWrap)):((0,_dom__WEBPACK_IMPORTED_MODULE_8__.addClass)(boxBody,"box_no_title"),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(boxTitleWrap))),options.titleTransparent&&(boxTitleWrap.classList.add("box_title_wrap--transparent"),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(boxTitleWrap)),options.titleControls&&(boxTitleControls.innerHTML=options.titleControls),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.toggleClass)(boxBody,"box_no_buttons",options.hideButtons),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.toggleClass)(boxTitleWrap,"box_grey",options.grey),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.toggleClass)(boxTitleWrap,"box_white",options.white),boxContainer.style.width="string"==typeof options.width?options.width:options.width+"px",boxContainer.style.height="string"==typeof options.height?options.height:options.height+"px"}function addButtonInternal(e,t,n,r){var o;"no"===n||"gray"===n?(o=_web_ui_FlatButton__WEBPACK_IMPORTED_MODULE_15__.FlatButtonAppearance.TERTIARY,n="cancel"):(o=_web_ui_FlatButton__WEBPACK_IMPORTED_MODULE_15__.FlatButtonAppearance.PRIMARY,n="ok");var i=_web_ui_FlatButton__WEBPACK_IMPORTED_MODULE_15__.FlatButton.render({appearance:o,size:_web_ui_FlatButton__WEBPACK_IMPORTED_MODULE_15__.FlatButtonSize.M,children:e,restAttrs:{id:r}});return i.addEventListener("click",(e=>{emitter.emit(n,retBox),t.apply(null,[i,e])})),boxButtons.prepend(i),btns[n].push(i),i}function setControlsText(e){boxControlsText.innerHTML=e}function _removeButtons(){(0,_shared_lib_dom__WEBPACK_IMPORTED_MODULE_19__.emptyNode)(boxButtons),btns.ok.length=btns.cancel.length=0}var destroyMe=function(){(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(options.onClean)&&options.onClean(),(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(options.onDestroy)&&options.onDestroy(),options.noControls||_removeButtons(),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.cleanElems)(boxContainer,boxCloseButton,boxTitleWrap,options.noControls?void 0:boxControlsWrap),boxLayer.removeChild(boxContainer),delete window._message_boxes[guid]},hideMe=function(e,t,n){if(visible){visible=!1;var r=!0===e?0:options.animSpeed;options.hideOnBGClick&&(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.removeEvent)(document,"click",boxQueue.hideBGClick),(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(options.onBeforeHide)&&options.onBeforeHide();var o=function(){boxQueue.currHiding===_message_boxes[guid]&&(boxQueue.currHiding=!1),_message_boxes[guid].shOther||e||layers.boxhide(),!t&&options.selfDestruct?destroyMe():(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(boxContainer),(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(options.onHide)&&options.onHide(n),retBox.emit("afterHide",retBox)};r>0?(boxQueue.currHiding=_message_boxes[guid],(0,_fx__WEBPACK_IMPORTED_MODULE_9__.fadeOut)(boxContainer,r,o)):o()}};function showMe(e,t,n){if(!visible&&window._message_boxes[guid]&&!window._message_boxes[guid].forceHide){visible=!0;var r=!0===e||t?0:options.animSpeed;if(options.hideOnBGClick&&(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.addEvent)(document,"click",boxQueue.hideBGClick),t||layers.boxshow(),boxQueue.currHiding){boxQueue.currHiding.shOther=!0;var o=boxQueue.currHiding.bodyNode.parentNode.parentNode;(0,_dom__WEBPACK_IMPORTED_MODULE_8__.data)(o,"tween").stop(!0)}r>0?(0,_fx__WEBPACK_IMPORTED_MODULE_9__.fadeIn)(boxContainer,r):(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(boxContainer),(0,_box_utils__WEBPACK_IMPORTED_MODULE_13__.boxRefreshCoords)(boxContainer),options.onShow&&options.onShow(n)}}return(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.addEvent)(boxCloseButton,"click",boxQueue.hideLast),retBox=window._message_boxes[guid]={guid,_show:showMe,_hide:hideMe,bodyNode:boxBody,controlsTextNode:boxControlsText,titleWrap:boxTitleWrap,btns,show:function(){return boxQueue._show(guid),this},progress:boxProgress,showCloseProgress:_dom__WEBPACK_IMPORTED_MODULE_8__.addClass.pbind(boxTitleWrap,"box_loading"),hideCloseProgress:_dom__WEBPACK_IMPORTED_MODULE_8__.removeClass.pbind(boxTitleWrap,"box_loading"),showProgress:function(){(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(boxControlsText),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(boxProgress)},hideProgress:function(){(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(boxProgress),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(boxControlsText)},hide:function(e){return!((0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(options.onHideAttempt)&&!options.onHideAttempt(e))&&(boxQueue._hide(guid),!0)},isVisible:function(){return visible},bodyHeight:function(){return(0,_dom__WEBPACK_IMPORTED_MODULE_8__.getStyle)(boxBody,"height")},content:function(e){return options.onClean&&options.onClean(),"string"==typeof e?boxBody.innerHTML=e:e instanceof HTMLElement&&(boxBody.innerHTML="",boxBody.appendChild(e)),options.refreshCoordsOnTimeout?setTimeout((()=>{(0,_box_utils__WEBPACK_IMPORTED_MODULE_13__.boxRefreshCoords)(boxContainer)})):(0,_box_utils__WEBPACK_IMPORTED_MODULE_13__.boxRefreshCoords)(boxContainer),boxContainer.focus(),refreshBox(),(0,_accessibility__WEBPACK_IMPORTED_MODULE_14__.updateAriaElements)(),this},emit:function(e,t){emitter.emit(e,t)},addButton:function(e,t,n,r,o){var i=addButtonInternal(e,t||this.hide,n,o);return r?i:this},setButtons:function(e,t,n,r){return _removeButtons(),e?(this.addButton(e,t),n&&this.addButton(n,r,"no"),this):this.addButton((0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("box_close"))},setControlsText,removeButtons:function(){return _removeButtons(),this},setBackTitle:function(e){e?(boxTitle.innerHTML='<div class="back"><span class="back__icon">'+(0,_icons_desktop_getIcon24BrowserBack__WEBPACK_IMPORTED_MODULE_20__.getIcon24BrowserBack)().icon+"</span>"+(0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("global_box_title_back")+"</div>",boxTitleBck=options.title,options.title=boxTitle.innerHTML,setTimeout((function(){var t=boxTitle.querySelector(".back");t&&(t.onclick=e)}),100)):boxTitleBck&&(boxTitle.innerHTML=options.title=boxTitleBck,boxTitleBck=!1)},destroy:destroyMe,getOptions:function(){return options},on:function(e,t){emitter.on(e,t)},once:function(e,t){emitter.once(e,t)},updateBoxCoords:function(){(0,_box_utils__WEBPACK_IMPORTED_MODULE_13__.boxRefreshCoords)(boxContainer)},setOptions:function(e){return options.hideOnBGClick&&(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.removeEvent)(document,"click",boxQueue.hideBGClick),options=(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.extend)(options,e),"bodyStyle"in e&&applyBodyStyle(options.bodyStyle),options.hideOnBGClick&&(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.addEvent)(document,"click",boxQueue.hideBGClick),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.toggle)(boxControlsWrap,!options.hideButtons),refreshBox(),options.noRefreshCoords||(0,_box_utils__WEBPACK_IMPORTED_MODULE_13__.boxRefreshCoords)(boxContainer),this},evalBox:function evalBox(js,url,params){var scr="((function() { return function() { var box = this; "+(js||"")+";}; })())";if(__debugMode){var fn=eval(scr);fn.apply(this,[url,params])}else try{var _fn=eval(scr);_fn.apply(this,[url,params])}catch(e){(0,_ui_util__WEBPACK_IMPORTED_MODULE_7__.topError)(e,{dt:15,type:7,url,query:params?(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_12__.toQueryString)(params):void 0,js}),(0,_debug_tools__WEBPACK_IMPORTED_MODULE_5__.logEvalError)(e,scr)}},preventHideLastWithCheck:options.preventHideLastWithCheck,execInline:function(e){window.vk.inline[e](this),delete window.vk.inline[e]}},retBox}function showBox(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if((0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.checkEvent)(r))return!1;var o=n.params||{};n.containerClass&&(o.containerClass=n.containerClass);var i=Date.now().toString(36);t&&(t.boxhash=i);var a=new MessageBox(o);a.boxhash=i;var s={onDone:function(r,s,c,l){if(n.preOnDone&&n.onDone&&n.onDone(a),t&&"function"==typeof t.onMessageSend&&window.WriteBox&&window.WriteBox.once("message_sended",t.onMessageSend),a.isVisible())if(__debugMode)u();else try{u()}catch(n){(0,_ui_util__WEBPACK_IMPORTED_MODULE_7__.topError)(n,{dt:15,type:103,url:e,query:(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_12__.toQueryString)(t),answer:Array.prototype.slice.call(arguments).join("<!>")}),a.isVisible()&&a.hide()}else n.onDone&&n.onDone(a,l);function u(){(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(boxLayerBG),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.addClass)(bodyNode,"layers_shown"),a.setOptions({title:r,hideButtons:o.hideButtons||!1}),n.showProgress?a.show():(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(a.bodyNode),a.content(s),n.noEval?a.execInline(i):a.evalBox(c,e,t),n.onDone&&n.onDone(a,l)}},onFail:function(e){if(a.failed=!0,setTimeout(a.hide,0),(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(n.onFail))return n.onFail(e)},cache:n.cache,stat:n.stat,fromBox:!0};return n.prgEl&&(n.showProgress=_ui_util__WEBPACK_IMPORTED_MODULE_7__.showGlobalPrg.pbind(n.prgEl,{cls:n.prgClass,w:n.prgW,h:n.prgH,hide:!0}),n.hideProgress=_dom__WEBPACK_IMPORTED_MODULE_8__.hide.pbind("global_prg")),n.showProgress?(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.extend)(s,{showProgress:n.showProgress,hideProgress:n.hideProgress}):(a.setOptions({title:!1,hideButtons:!0}).show(),boxQueue.count()<2&&((0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(boxLayerBG),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.removeClass)(bodyNode,"layers_shown")),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(a.bodyNode),s.showProgress=function(){(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(boxLoader),(0,_box_utils__WEBPACK_IMPORTED_MODULE_13__.boxRefreshCoords)(boxLoader)},s.hideProgress=_dom__WEBPACK_IMPORTED_MODULE_8__.hide.pbind(boxLoader)),a.removeButtons().addButton((0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("global_close")),ajax.post(e,t,s),a}function showTabbedBox(e,t,n,r){return(n=n||{}).stat=n.stat||[],n.stat.push(jsc("web/box.js"),"boxes.css"),showBox(e,t,n,r)}function showFastBox(e,t,n,r,o,i){return new MessageBox("string"==typeof e?{title:e}:e).content(t).setButtons(n,r,o,i).show()}function showCaptchaBox(e,t,n,r){var o=function(t){if(!t||void 0===t.keyCode||10===t.keyCode||13===t.keyCode){var o=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByTag1)("input",n.bodyNode);if((0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.trim)(o.value)||!0===t){var i=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByTag1)("img",n.bodyNode)[0];(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.removeEvent)(o),(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.removeEvent)(i),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)((0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByClass1)("progress",n.bodyNode)),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)(o),r.onSubmit(e,o.value)}else(0,_dom__WEBPACK_IMPORTED_MODULE_8__.elfocus)(o)}},i=!!n,a=(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.intval)(t)?"":"&s=1",s=r.imgSrc||"/captcha.php?sid="+e+a;if(!i){var c=`\n<div class="captcha">\n  <div><img src="${s}"/></div>\n  <div>\n    <input type="text" class="big_text" maxlength="7" placeholder="${(0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("global_captcha_input_here")}" />\n    <div class="progress" /></div>\n  </div>\n</div>`+(r.addText||"");n=showFastBox({title:(0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("captcha_enter_code"),width:305,onHide:r.onHide,onDestroy:r.onDestroy||!1},c,(0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("captcha_send"),(function(){n.submit()}),(0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("captcha_cancel"),(function(){var e=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByTag1)("input",n.bodyNode),t=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByTag1)("img",n.bodyNode);(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.removeEvent)(e),(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.removeEvent)(t),n.hide()}))}n.submit=o.pbind(!0),n.changed=!0;var l=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByTag1)("input",n.bodyNode),u=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByTag1)("img",n.bodyNode);return i&&(l.value="",u.src="/captcha.php?sid="+e+a,(0,_dom__WEBPACK_IMPORTED_MODULE_8__.hide)((0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByClass1)("progress",n.bodyNode))),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.show)(l),(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.addEvent)(l,"keypress",o),(0,_dom_events__WEBPACK_IMPORTED_MODULE_6__.addEvent)(u,"click",(function(){this.src="/captcha.php?sid="+e+a+"&v="+(0,_utils_common__WEBPACK_IMPORTED_MODULE_10__.irand)(1e6,2e6)})),(0,_dom__WEBPACK_IMPORTED_MODULE_8__.elfocus)(l),n}function showReCaptchaBox(e,t,n,r){window.recaptchaResponse=function(e){r.onSubmit(e)};var o=!!n,i=!!window.grecaptcha;if(!o){i||(window.recaptchaCallback=function(){var t=(0,_box_utils__WEBPACK_IMPORTED_MODULE_13__.curBox)();if(t){var n=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByClass1)("recaptcha",t.bodyNode);n&&((0,_dom__WEBPACK_IMPORTED_MODULE_8__.val)(n,""),window.grecaptcha.render(n,{sitekey:e,callback:window.recaptchaResponse}))}},headNode.appendChild((0,_dom__WEBPACK_IMPORTED_MODULE_8__.ce)("script",{type:"text/javascript",src:"https://www.google.com/recaptcha/api.js?onload=recaptchaCallback&render=explicit&hl="+t})));var a='<div class="recaptcha"></div>'+(r.addText||"");n=showFastBox({title:(0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("global_recaptcha_title"),width:354,onHide:r.onHide,onDestroy:r.onDestroy||!1},a,(0,_lang__WEBPACK_IMPORTED_MODULE_11__.getLang)("captcha_cancel"));var s=(0,_dom__WEBPACK_IMPORTED_MODULE_8__.geByClass1)("recaptcha",n.bodyNode);s.id="recaptcha"+(n.guid?n.guid:"0"),(0,_ui__WEBPACK_IMPORTED_MODULE_4__.showProgress)(s)}return o&&i?window.grecaptcha.reset():i&&window.recaptchaCallback(),n.changed=!0,n}},516604:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__});var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(175115),core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(66108),core_js_modules_es6_promise__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(940851),core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(296253),core_js_modules_es6_regexp_search__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(976142),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(751876),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(59357),core_js_modules_es6_regexp_constructor__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(283946),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(21466),_utils_common__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(695724),_shared_lib_common__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(40906),_ads__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(778273),_debug_tools__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(787481),_dom__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(315544),_dom_events__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(49535),_scroll__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(803834),_ui_util__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(159121),_shared_lib_convert__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(668040),_nav_utils__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(447215),_shared_counters_updateCounters__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(533304),_layout_utils__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(635429),_video__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(325489),_legacy_performance_stats__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(768883),_shared_lib_browser__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(726271),_feature_entries__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(850167),_accessibility__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(376270),_top_search__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(689433),_stl__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(363604),_utils__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(982452),_message_box__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(654612),_lang__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(786067),_shared_navigation_stats__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(649846),_web_lib_ajax_module_callback__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(553429),_shared_evbus__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(182804),_shared_user_user_env__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(19331),_shared_network_stats_module_navigation_module_navigation_collector__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(816426),_shared_network_stats__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(830648),_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(479957);function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}var SHOW_MORE_APPS_SHOWN_CLASSNAME="show_more_apps_container_shown",SHOW_MORE_APPS_BUTTON_HIDDEN_CLASSNAME="show_more_apps_button_hidden",updateCountersTimeout,Nav={getData:function(e){if(e.length){for(var t in navMap){if(navMap.hasOwnProperty(t))if("<"!==t[0])if(e.match(new RegExp("^"+t,"i")))return navMap[t][2]?null:{url:navMap[t][0],files:navMap[t][1]}}return e.match(/^[a-z0-9\-_]+\.php$/i)?{url:e}:{url:navMap["<other>"][0],files:navMap["<other>"][1]}}return{url:navMap["<void>"][0],files:navMap["<void>"][1]}},reload:function(e){if(!(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.reloadCheckFlood)(e)){e=e||{};var t=Nav.strLoc.replace(/^\/+/g,"");e.force?(hab.stop(),location.href="/"+t):(TopNotifier.invalidate(),Nav.go("/"+t,void 0,(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.extend)({nocur:!0},e)))}},link:function(e,t){if((0,_dom_events__WEBPACK_IMPORTED_MODULE_14__.checkEvent)(t)||cur.noAjaxNav){var n=e.replace(new RegExp("^("+locProtocol+"//"+locHost+")?/?","i"),"");window.open(n)}else Nav.go(e)},go:function go(loc,ev){var opts=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Nav.showLessApps(),loc&&loc.href&&loc.getAttribute&&loc.getAttribute("data-change-location-with-post-away")){var newLink=loc.href,_postParams=Nav.getPostParams(loc,!(!opts.params||!opts.params._post_click_type)),postOptions=Nav.mergePostParamsOptions(_postParams,opts.params),extraQuery={};return postOptions._post&&(extraQuery.post=postOptions._post,postOptions._post_ad_data&&(extraQuery.post_ad_data=postOptions._post_ad_data),postOptions._post_click_cc_key&&(extraQuery.cc_key=postOptions._post_click_cc_key),newLink="/away.php?to="+encodeURIComponent(newLink)+"&"+(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_17__.toQueryString)(extraQuery)),location.href=newLink,!1}if(!(0,_dom_events__WEBPACK_IMPORTED_MODULE_14__.checkEvent)(ev)&&!cur.noAjaxNav){if(LongView.onBeforePageChange(),loc.tagName&&"a"===loc.tagName.toLowerCase()){if("_blank"===loc.target||Nav.baseBlank)return;var _params=loc.getAttribute("hrefparams");if(_params&&(opts.params=(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.extend)(opts.params||{},(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_17__.fromQueryString)(_params))),loc=loc.href||"",ev&&!(loc||"").match(new RegExp("^"+locProtocol+"//"+locHost,"i")))return}var strLoc="",objLoc={},changed={};"string"==typeof loc?(loc=loc.replace(new RegExp("^("+locProtocol+"//"+locHost+")?/?","i"),""),strLoc=loc,objLoc=Nav.fromStr(loc)):(loc[0]||(loc[0]=""),strLoc=Nav.toStr(loc),objLoc=loc),opts.hard&&(location.href=strLoc),cur.isCurrentVideoLayer&&!objLoc.section&&-1!==objLoc[0].indexOf("/playlist/")&&(objLoc.section="album_"+objLoc[0].split("_")[1]);var bugtrackerLocations=/(^bug\d+|^bugs$|^bugs_mng$|^bugtracker_adm$)/;if(!(-1!==Nav.objLoc[0].search(bugtrackerLocations)&&-1===objLoc[0].search(bugtrackerLocations)||-1===Nav.objLoc[0].search(bugtrackerLocations)&&-1!==objLoc[0].search(bugtrackerLocations))){(0,_legacy_performance_stats__WEBPACK_IMPORTED_MODULE_22__.statDurationsLoadImage)(),(0,_legacy_performance_stats__WEBPACK_IMPORTED_MODULE_22__.statNavigationTiming)(),0===strLoc.indexOf("market")&&window.MarketAnalyticsManager&&window.MarketAnalyticsManager.setScreen(window.cur.module);var donutLinkRegex=/^donut\/([A-Za-z0-9_\.]{2,32})/;if(!opts.skipDonutLinkCheck&&strLoc.match(donutLinkRegex)){var source="direct_link",parsedLoc=strLoc.match(donutLinkRegex),ownerDomain=parsedLoc[1],groupDoesntExistsCallback=()=>{nav.go(strLoc,ev,_extends({},opts,{skipDonutLinkCheck:!0}))};return(0,_feature_entries__WEBPACK_IMPORTED_MODULE_24__.showDonutSubscribePopup)(null,null,null,source,"",{type:"subscribe",fromSnippet:!0,onFailCallback:groupDoesntExistsCallback,params:{act:"subscribe_popup"}},ownerDomain),!1}var ap=(0,_feature_entries__WEBPACK_IMPORTED_MODULE_24__.getAudioPlayer)();if(ap&&ap.updateCurrentPlaying&&ap.updateCurrentPlaying(),!opts.nocur){for(var i in changed=(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.clone)(objLoc),Nav.objLoc)Nav.objLoc.hasOwnProperty(i)&&(Nav.objLoc[i]===changed[i]?delete changed[i]:void 0===changed[i]&&(changed[i]=!1));if(!1===(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.zNav)((0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.clone)(changed),{hist:opts.hist,asBox:opts.asBox,onDone:opts.onDone},objLoc))return Nav.setLoc(strLoc),!1;bookmarksNav(ev,strLoc);var onArticleNavBack=cur._back&&cur._back.hasOwnProperty("onArticleNavBack")?cur._back.onArticleNavBack:null,isHandled=articleNav(strLoc,Nav.toStr(Nav.objLoc),opts.back,onArticleNavBack,ev);if(isHandled)return Promise.resolve(isHandled).then((()=>{strLoc=cleanArticleUrlByObjLoc(objLoc),Nav.setLoc(strLoc,!0),(Nav.objLoc.z||Nav.objLoc.w)&&(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.zNav)({z:Nav.objLoc.z,w:Nav.objLoc.w},{})})),!1;var isHandledAuthorPage=authorPageNav(strLoc,Nav.toStr(Nav.objLoc),opts.back,opts.postId);if(isHandledAuthorPage)return window.AuthorPage&&window.AuthorPage.isOpen()&&cur.articleEditorLayer&&cur.articleEditorLayer.hide(!1),cur._hardNav?(window.location.href=strLoc,!1):(Nav.setLoc(strLoc),(Nav.objLoc.z||Nav.objLoc.w)&&(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.zNav)({z:Nav.objLoc.z,w:Nav.objLoc.w},{}),!1)}if(!opts.nocur&&(vk.loaded||!changed[0]))for(var curnav=cur.nav||[],_i=curnav.length-1;_i>=0;_i--){var oldUrl=document.URL;if(!1===curnav[_i]((0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.clone)(changed),Nav.objLoc,objLoc,opts)){var currentURL=`${locProtocol}//${location.host}/${strLoc}`,referrer=oldUrl===currentURL?"":oldUrl;return updateCountersTimeout&&clearTimeout(updateCountersTimeout),updateCountersTimeout=setTimeout(_shared_counters_updateCounters__WEBPACK_IMPORTED_MODULE_19__.updateCounters.pbind(currentURL,referrer),10),!1}}if(4===vk.al||!vk.loaded&&(!window.audioPlayer||!audioPlayer.player)&&changed[0])return setTimeout((function(){location.href="/"+(strLoc||"").replace("%23","#")}),0),!1;if(window.Upload&&Upload.terminateAllUploads(),(0,_top_search__WEBPACK_IMPORTED_MODULE_26__.topHeaderClose)(),opts.back){if(cur._back&&cur._back.onBack)return cur._back.onBack(strLoc);for(var _i2=0,l=globalHistory.length;_i2<l;_i2++)if(globalHistory[_i2].loc===strLoc){var _ret=function(){var e=globalHistory.splice(_i2,1)[0],t=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("wrap3"),n=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("title"),r=cur._onback;return window.tooltips&&tooltips.destroyAll(),(0,_dom__WEBPACK_IMPORTED_MODULE_13__.hide)("audio_tip_wrap"),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.processDestroy)(cur),window.radioBtns=e.radioBtns,window.ajaxCache=e.ajaxCache,window.PageID=e.pid,boxQueue.hideAll(!1,!0),layerQueue.clear(),layers.fullhide&&layers.fullhide(!0),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.showBackLink)(),window.cur=e.cur,setTimeout((function(){if(t.innerHTML="",t.parentNode.replaceChild(e.content,t),vk.width===e.width&&vk.width_dec===e.width_dec&&vk.width_dec_footer===e.width_dec_footer||(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.handlePageView)(e),(0,_scroll__WEBPACK_IMPORTED_MODULE_15__.scrollToY)(e.scrollTop,0),(0,_dom__WEBPACK_IMPORTED_MODULE_13__.setDocumentTitle)(e.htitle),n&&(n.innerHTML=e.title,(0,_dom__WEBPACK_IMPORTED_MODULE_13__.setStyle)(n.parentNode,"display",e.hideHeader?"none":"block")),e.bodyClass!==bodyNode.className&&(bodyNode.className=e.bodyClass||"",vk.body_class=e.bodyClass||""),cur._back.show)for(var o=0,i=cur._back.show.length;o<i;o++)cur._back.show[o]();if(!cur.noquickreg&&(0,_shared_lib_common__WEBPACK_IMPORTED_MODULE_10__.isFunction)(window.changeQuickRegButton)&&window.changeQuickRegButton(!1),r)for(var a=0,s=r.length;a<s;a++)r[a]();Nav.setLoc(strLoc);var c=e.back||{};setTimeout((function(){_shared_navigation_stats__WEBPACK_IMPORTED_MODULE_31__.navigationStat.addStatEvent(_shared_navigation_stats__WEBPACK_IMPORTED_MODULE_31__.navigationStat.getModule(),_shared_navigation_stats__WEBPACK_IMPORTED_MODULE_31__.NavigationProductionStatEventTypes.BACK),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.showBackLink)(c[0],c[1],c[2]),(Nav.objLoc.z||Nav.objLoc.w)&&(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.zNav)({z:Nav.objLoc.z,w:Nav.objLoc.w},{}),(0,_stl__WEBPACK_IMPORTED_MODULE_27__.updateSTL)(),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.updateLeftMenu)(),(0,_accessibility__WEBPACK_IMPORTED_MODULE_25__.updateAriaElements)(),_top_search__WEBPACK_IMPORTED_MODULE_26__.default.clear()}),10),(0,_feature_entries__WEBPACK_IMPORTED_MODULE_24__.getAudioPlayer)().updateCurrentPlaying()}),10),{v:!1}}();if("object"==typeof _ret)return _ret.v}}var dest=objLoc[0],where;delete objLoc[0];try{where=Nav.getData(dest)}catch(e){where=null}if(null===where){if(opts.throwErrorOnDisabledPath)throw new Error("AL navigation is disabled for this path");return!0}opts.noframe||(opts.tstat=ajax.tGetParam(),ajax.tStart=(new Date).getTime(),opts.bench=!0),opts.params&&opts.params._ref||(opts.params=(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.extend)(opts.params||{},{_ref:Nav.objLoc[0]||""})),where.files&&stManager.add(where.files),where.params=(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.extend)({__query:dest,al_id:vk.id},objLoc,opts.params||{});var postParamsEl=ev&&ev.target&&ev.target.getAttribute?ev.target:loc&&loc.getAttribute?loc:null,postParams=Nav.getPostParams(postParamsEl,!!where.params._post_click_type);where.params=Nav.mergePostParamsOptions(postParams,where.params),opts.cl_id&&(where.params.fr_click=cur.oid+","+opts.cl_id+","+cur.options.fr_click),opts.tstat&&(where.params._tstat=opts.tstat),opts.permanent&&(where.params._permanent=opts.permanent);var curNavVersion=++NextPageID,done=function done(title,html,js,params){if(curNavVersion===NextPageID){try{params._id=params.id}catch(e){return(0,_ui_util__WEBPACK_IMPORTED_MODULE_16__.topError)(e,{dt:15,type:6,msg:`Error: ${e.message}, (params undefined?), title: ${title}, html: ${html}, js: ${js}`,url:where.url,query:(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_17__.toQueryString)(where.params),answer:arguments.length})}var execTqTasks=e=>{params.exec_on_start&&(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_32__.processExecData)(JSON.stringify(params.exec_on_start),e)};window.lastScrollTop=(0,_scroll__WEBPACK_IMPORTED_MODULE_15__.scrollGetY)(),opts.bench&&(ajax.tProcess=(new Date).getTime());var isReloadRequired=stVersions[jsc("web/common_web.js")]>StaticFiles[jsc("web/common_web.js")].v,needForceReloadForDomainMigration=(0,_shared_user_user_env__WEBPACK_IMPORTED_MODULE_33__.partConfigEnabled)("domain_migration_navigation_reload");if(needForceReloadForDomainMigration&&(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_36__.statlogsValueEvent)("tmp_stat_2","","login_migrate_cookies","force_reload_by_nav"),isReloadRequired||needForceReloadForDomainMigration){var _window$Calls;if(Nav.setLoc(params.loc||Nav.strLoc),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.reloadCheckFlood)({force:!0,from:4}))return;if(null===(_window$Calls=window.Calls)||void 0===_window$Calls?void 0:_window$Calls.isInActiveCall)return;location.reload(!0)}else{var newPage=void 0===where.params.al_id||where.params.al_id!=params.id||params.fullPage,tNode=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("title"),wNode=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("wrap3"),_back=cur._back,hist=!1;if((strLoc===(cur._back||{}).loc||newPage||opts.back)&&(_back=!1),(opts.noback||params.level&&(!cur._level||params.level<=cur._level)&&!1!==opts.noback)&&(_back=!1,(opts.noback||cur._level&&params.level<cur._level)&&(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.showBackLink)()),window.tooltips&&tooltips.destroyAll(),(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.each)((0,_dom__WEBPACK_IMPORTED_MODULE_13__.geByClass)("page_actions_wrap"),((e,t)=>(0,_dom__WEBPACK_IMPORTED_MODULE_13__.hide)(t))),(0,_dom__WEBPACK_IMPORTED_MODULE_13__.hide)("audio_tip_wrap"),_back){if((0,_video__WEBPACK_IMPORTED_MODULE_21__.revertLastInlineVideo)(null,!0),hist={loc:_back.loc||Nav.strLoc,cur,radioBtns:(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.clone)(radioBtns),ajaxCache,pid:PageID,scrollTop:(0,_scroll__WEBPACK_IMPORTED_MODULE_15__.scrollGetY)(),htitle:document.title.toString(),width:vk.width,width_dec:vk.width_dec,width_dec_footer:vk.width_dec_footer,noleftmenu:vk.noleftmenu,notopmenu:vk.notopmenu,nobottommenu:vk.nobottommenu,bodyClass:vk.body_class,back:!(!_tbLink||!_tbLink.loc)&&[_tbLink.loc,(0,_dom__WEBPACK_IMPORTED_MODULE_13__.val)(_tbLink),_tbLink.fast]},tNode&&tNode.parentNode&&!(0,_dom__WEBPACK_IMPORTED_MODULE_13__.isVisible)(tNode.parentNode)&&(hist.hideHeader=!0),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.globalHistoryDestroy)(hist.loc),globalHistory.length>2){var h=globalHistory.shift();(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.processDestroy)(h.cur),h.content.innerHTML=""}if(cur._back.hide)for(var _i5=0,_l3=cur._back.hide.length;_i5<_l3;_i5++)cur._back.hide[_i5]();_back.text&&(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.showBackLink)(hist.loc,_back.text,1)}else _tbLink&&(_tbLink.fast=0),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.processDestroy)(cur);if(PageID=NextPageID,(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.each)(radioBtns,(function(e,t){t.keep||delete radioBtns[e]})),window.ajaxCache={},boxQueue.hideAll(!1,!0),layerQueue.clear(),layers.fullhide&&layers.fullhide(!0,!0),window.cur={beforeNavigateRequestHandlers:[],destroy:[],nav:[]},window._stlWas=0,newPage){for((0,_dom__WEBPACK_IMPORTED_MODULE_13__.cleanElems)("quick_login_button","quick_expire","search_form","top_links","bottom_nav");globalHistory.length;){var _h=globalHistory.shift();(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.processDestroy)(_h.cur),_h.content.innerHTML=""}var oldTopW=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("dev_top_nav_wrap")&&(0,_dom__WEBPACK_IMPORTED_MODULE_13__.getSize)("dev_top_nav_wrap")[0]||(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("page_header_wrap")&&(0,_dom__WEBPACK_IMPORTED_MODULE_13__.getSize)("page_header_wrap")[0]||0;pageNode.innerHTML=html,execTqTasks(pageNode),oldTopW&&!vk.staticheader&&(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.updateHeaderStyles)({width:oldTopW}),window._tbLink=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("top_back_link");try{_tbLink.style.maxWidth=_tbLink.parentNode.offsetWidth-35+"px"}catch(e){}_shared_lib_browser__WEBPACK_IMPORTED_MODULE_23__.browser.mobile||(0,_layout_utils__WEBPACK_IMPORTED_MODULE_20__.onBodyResize)(!0)}else{if(_back){var newW=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ce)("div",{id:"wrap3"});(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.extend)(hist,{content:wNode.parentNode.replaceChild(newW,wNode),title:tNode?tNode.innerHTML:""}),globalHistory.push(hist),wNode=newW}var _oldTopW=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("dev_top_nav_wrap")&&(0,_dom__WEBPACK_IMPORTED_MODULE_13__.getSize)("dev_top_nav_wrap")[0]||(0,_dom__WEBPACK_IMPORTED_MODULE_13__.ge)("page_header_wrap")&&(0,_dom__WEBPACK_IMPORTED_MODULE_13__.getSize)("page_header_wrap")[0]||0;wNode&&(wNode.innerHTML=html,execTqTasks(wNode)),_oldTopW&&!vk.staticheader&&(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.updateHeaderStyles)({width:_oldTopW}),tNode&&(tNode.innerHTML=title,(title?_dom__WEBPACK_IMPORTED_MODULE_13__.show:_dom__WEBPACK_IMPORTED_MODULE_13__.hide)(tNode.parentNode)),(0,_feature_entries__WEBPACK_IMPORTED_MODULE_24__.getAudioPlayer)().updateCurrentPlaying()}if((0,_layout_utils__WEBPACK_IMPORTED_MODULE_20__.checkPageBlocks)(),(0,_stl__WEBPACK_IMPORTED_MODULE_27__.updateSTL)(),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.updateLeftMenu)(),(0,_accessibility__WEBPACK_IMPORTED_MODULE_25__.updateAriaElements)(),_top_search__WEBPACK_IMPORTED_MODULE_26__.default.clear(),(0,_nav_utils__WEBPACK_IMPORTED_MODULE_18__.handlePageParams)(params),opts.preventScroll||(opts.scrollTop>0?(0,_scroll__WEBPACK_IMPORTED_MODULE_15__.scrollToY)(opts.scrollTop,0):opts.noscroll||params.noscroll||(0,_scroll__WEBPACK_IMPORTED_MODULE_15__.scrollToTop)(0)),opts.bench&&(ajax.tRender=(new Date).getTime()),Nav.curLoc=params.loc,js){var evalString=`(function(){${js};})()`;if(__debugMode)eval(evalString);else try{eval(evalString)}catch(e){(0,_debug_tools__WEBPACK_IMPORTED_MODULE_12__.logEvalError)(e,evalString)}}ajax._framenext(),opts.onDone&&opts.onDone(),_shared_lib_browser__WEBPACK_IMPORTED_MODULE_23__.browser.mobile&&(0,_layout_utils__WEBPACK_IMPORTED_MODULE_20__.onBodyResize)(),changed.f&&(0,_utils__WEBPACK_IMPORTED_MODULE_28__.handleScroll)(changed.f),Nav.setLoc(params.loc||""),changed[0]&&(window.vkLastNav=Date.now()),(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.lTimeout)((function(){(0,_feature_entries__WEBPACK_IMPORTED_MODULE_24__.getAudioPlayer)().updateCurrentPlaying(),TopMenu.toggle(!1)}),_shared_lib_browser__WEBPACK_IMPORTED_MODULE_23__.browser.chrome?100:50)}}};return window.Page&&(Page.postsSave(),Page.postsSend(),Page.postsClearTimeouts()),(0,_ads__WEBPACK_IMPORTED_MODULE_11__.updSeenAdsInfo)(),(0,_ads__WEBPACK_IMPORTED_MODULE_11__.__adsUpdate)("already"),"im"!==Nav.objLoc[0]&&"im"!==changed[0]||(where.params=(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.extend)({},where.params,{_full_page:!0})),(0,_web_lib_ajax_module_callback__WEBPACK_IMPORTED_MODULE_37__.subscribeOnModuleEvaluated)((()=>{_shared_navigation_stats__WEBPACK_IMPORTED_MODULE_31__.navigationStat.addStatEvent(_shared_navigation_stats__WEBPACK_IMPORTED_MODULE_31__.navigationStat.getModule(),_shared_navigation_stats__WEBPACK_IMPORTED_MODULE_31__.NavigationProductionStatEventTypes.GO)}),!0),Array.isArray(window.cur.beforeNavigateRequestHandlers)&&window.cur.beforeNavigateRequestHandlers.forEach((e=>{"function"==typeof e&&e()})),window.cur.beforeNavigateRequestHandlers=[],!__debugMode&&(0,_shared_user_user_env__WEBPACK_IMPORTED_MODULE_33__.partConfigEnabled)("measure_module_navigation_stats")&&window.performance.mark(_shared_network_stats_module_navigation_module_navigation_collector__WEBPACK_IMPORTED_MODULE_34__.ModuleNavigationStatMarks.web2.PERF_MARK),ajax.post(where.url,where.params,{onDone:function(){var e=arguments;if(__debugMode)done.apply(null,e);else{try{done.apply(null,e)}catch(t){(0,_ui_util__WEBPACK_IMPORTED_MODULE_16__.topError)(t,{dt:15,type:6,url:where.url,query:(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_17__.toQueryString)(where.params),js:e[2],answer:Array.prototype.slice.call(arguments).join("<!>")})}(0,_shared_user_user_env__WEBPACK_IMPORTED_MODULE_33__.partConfigEnabled)("measure_module_navigation_stats")&&(0,_web_lib_ajax_module_callback__WEBPACK_IMPORTED_MODULE_37__.subscribeOnModuleEvaluated)((()=>new _shared_network_stats_module_navigation_module_navigation_collector__WEBPACK_IMPORTED_MODULE_34__.ModuleNavigationStatCollector(_shared_network_stats__WEBPACK_IMPORTED_MODULE_35__.NetworkStatCollectorInstance).logEvent()),!0)}},onFail:opts.onFail||function(e){if(e)return setTimeout((0,_message_box__WEBPACK_IMPORTED_MODULE_29__.showFastBox)({title:(0,_lang__WEBPACK_IMPORTED_MODULE_30__.getLang)("global_error")},e).hide,__debugMode?3e4:3e3),!0},frame:opts.noframe?0:1,canReload:!0,showProgress:opts.showProgress,hideProgress:opts.hideProgress,cache:opts.search?1:"",bench:opts.bench}),!1}location.href=strLoc}},setLoc:function(e,t){var n,r;n=r=e,"string"==typeof e?r=Nav.fromStr(e):n=Nav.toStr(e),(t||!(0,_feature_entries__WEBPACK_IMPORTED_MODULE_24__.isArticleLayerOpen)()||n.match(/article_edit(-?\d+_\d+)/))&&(Nav.strLoc=n,Nav.objLoc=r,hab.setLoc(Nav.strLoc))},change:function(e,t,n){var r=(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.clone)(Nav.objLoc);return(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.each)(e,(function(e,t){!1===t?delete r[e]:r[e]=t})),Nav.go(r,t,n)},fromStr:function(e){var t=(e=e.split("#"))[0].split("?"),n={0:t[0]||""};return e[1]&&(n["#"]=e[1]),(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.extend)((0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_17__.fromQueryString)(t[1]||""),n)},toStr:function(e){var t=(e=(0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.clone)(e))["#"]||"",n=e[0]||"";delete e[0],delete e["#"];var r=(0,_shared_lib_convert__WEBPACK_IMPORTED_MODULE_17__.toQueryString)(e);return(r?n+"?"+r:n)+(t?"#"+t:"")},init:function(){window.globalHistory=[],Nav.strLoc=hab.getLoc(),Nav.objLoc=Nav.fromStr(Nav.strLoc)},getPostParams:function(e,t){var n=!(!e||!e.getAttribute),r={};if(!n)return r;var o=e.getAttribute("data-post-id");o&&(r.post_id=o);var i=e.getAttribute("data-parent-post-id");i&&(r.parent_post_id=i);var a=e.getAttribute("data-post-click-type");a&&(r.post_click_type=a);var s=e.getAttribute("mention_id");s&&(r.post_click_mention_id=s);var c=e.getAttribute("data-post-click-cc-key");c&&(r.post_click_cc_key=c);var l=[e.getAttribute("href"),e.getAttribute("data-href")];if((0,_utils_common__WEBPACK_IMPORTED_MODULE_9__.each)(l,(function(e,t){if(t&&"#"!==t)return r.post_click_url=t,!1})),!!a||t){var u=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.gpeByClass)("_ads_block_data_w",e),d=(u=u||(0,_dom__WEBPACK_IMPORTED_MODULE_13__.gpeByClass)("_ads_promoted_post_data_w",e))&&u.getAttribute("data-ad"),_=u&&u.getAttribute("data-ad-block-uid");d&&(r.ad_data=d),_&&(r.ad_block_unique_id=_)}return r},mergePostParamsOptions:function(e,t){if(t=t||{},!e)return t;function n(e,n,r){var o=r&&t[n];return!(!e||o)&&(t[n]=e,!0)}return n(e.post_id,"_post",!0),n(e.parent_post_id,"_parent_post",!0),n(e.post_click_type,"_post_click_type",!0),t._post_click_type&&(n(e.post_click_mention_id,"_post_click_mention_id",!0),n(e.post_click_cc_key,"_post_click_cc_key",!0),n(e.post_click_url,"_post_click_url",!0),n(e.ad_data,"_post_ad_data",!0)&&n(e.ad_block_unique_id,"_post_ad_block_unique_id")),t},showMoreApps(){var e=getShowMoreAppsContainer();e&&(e.classList.add(SHOW_MORE_APPS_SHOWN_CLASSNAME),getShowMoreAppsButton().classList.add(SHOW_MORE_APPS_BUTTON_HIDDEN_CLASSNAME))},showLessApps(){var e=getShowMoreAppsContainer();e&&(e.classList.remove(SHOW_MORE_APPS_SHOWN_CLASSNAME),getShowMoreAppsButton().classList.remove(SHOW_MORE_APPS_BUTTON_HIDDEN_CLASSNAME))},subscribeOnModuleEvaluated:_web_lib_ajax_module_callback__WEBPACK_IMPORTED_MODULE_37__.subscribeOnModuleEvaluated,unsubscribeOnModuleEvaluated:_web_lib_ajax_module_callback__WEBPACK_IMPORTED_MODULE_37__.unsubscribeOnModuleEvaluated};function getShowMoreAppsContainer(){return document.querySelector(".show_more_apps_container")}function getShowMoreAppsButton(){return document.querySelector(".show_more_apps_button")}function authorPageNav(e,t,n){if(n&&cur.backFromAuthorPage)return delete cur.backFromAuthorPage,!0;var r=e.toLowerCase(),o=window.AuthorPage&&window.AuthorPage.isOpen(),i=r.match(/^(?:%40|@)-?[.a-z0-9_]+(?:\?\w+)?([\?&]z\=[a-z0-9-_]+)*$/);if(i)return!!o||(i[1]?cur._hardNav=!0:(boxRefreshCoords(boxLoader),(0,_dom__WEBPACK_IMPORTED_MODULE_13__.show)(boxLoader),(0,_dom__WEBPACK_IMPORTED_MODULE_13__.show)(boxLayerWrap),stManager.add([jsc("web/author_page.js"),jsc("web/article_layer.js"),"author_page.css","ui_controls.js","ui_controls.css"],(function(){cur.prevAuthorPageUrl=t,window.AuthorPage.showLayer(r)})),!0));if(o){if(/^article_edit([0-9\-]+)_(\d+)/.test(r))return!1;if(n&&window.AuthorPage.isStandalone())return window.location.reload(!0),!0;var a=window.AuthorPage.close(!0);return void 0!==a?a:!!n}}function articleNav(e,t,n,r,o){var i=e.toLowerCase(),a=/^(?:%40|@)-?[.a-z0-9_]+-[a-z0-9-]+(?:[\?&]\w+\=[a-z0-9-_]+)*$/;if(a.test(i))return window.isArticleLayerOpen()||(cur.articlePrevLoc=t),window.WkView&&WkView.hide(!0),window.boxQueue&&boxQueue.hideAll(),stManager.add([jsc("web/article_layer.js"),"article.css"]).then((()=>new Promise((e=>{ArticleLayer.show(i,!0,!1,{ev:o,onShowDone:()=>{cur.articleSequence=Math.max(1,(cur.articleSequence||0)+(n?-1:1)),e()},prepareAsync:!0})}))));if(window.isArticleLayerOpen()){if(n&&ArticleLayer.isStandalone())return window.location.reload(!0),!0;var s=()=>{ArticleLayer.close(),delete cur.articleSequence},c=cur.articlePrevLoc;return delete cur.articlePrevLoc,c&&!a.test(c)?e===c?(s(),r&&r(),!0):(layers.fullhide=function(){s()},!1):(s(),!0)}return!1}function cleanArticleUrlByObjLoc(e){return e&&e.ref&&delete e.ref,Nav.toStr(e)}function bookmarksNav(e){if(e){var t=(0,_dom__WEBPACK_IMPORTED_MODULE_13__.domClosest)("bookmarks_rows",e.target),n=!!(0,_dom__WEBPACK_IMPORTED_MODULE_13__.domClosest)("bookmarks_pages",e.target);if((t||n)&&(n||(0,_dom__WEBPACK_IMPORTED_MODULE_13__.hasClass)(t,"bookmarks_rows_user")||(0,_dom__WEBPACK_IMPORTED_MODULE_13__.hasClass)(t,"bookmarks_rows_group")||(0,_dom__WEBPACK_IMPORTED_MODULE_13__.hasClass)(t,"bookmarks_rows_page"))){var r;if(!(r=t?(0,_dom__WEBPACK_IMPORTED_MODULE_13__.domClosest)("_bookmark_page_item",e.target):(0,_dom__WEBPACK_IMPORTED_MODULE_13__.domClosest)("line_cell",e.target)))return;(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_36__.statlogsValueEvent)("bookmarks_product_analytics",{item_type:"page",item_id:(0,_shared_lib_common__WEBPACK_IMPORTED_MODULE_10__.intval)((0,_dom__WEBPACK_IMPORTED_MODULE_13__.domData)(r,"id")),time:window.getServerTime()})}}}const __WEBPACK_DEFAULT_EXPORT__=Nav},447215:(e,t,n)=>{"use strict";n.d(t,{initNavCounters:()=>R,updateHeaderStyles:()=>M,updateLeftMenu:()=>L,handlePageCount:()=>B,handlePageParams:()=>U,reloadCheckFlood:()=>F,globalHistoryDestroy:()=>W,showBackLink:()=>V,processDestroy:()=>H,handlePageView:()=>j,zNav:()=>K});n(530522),n(579665),n(95767),n(751876),n(21466),n(991181),n(83276),n(59357),n(66108),n(296253);var r=n(315544),o=n(695724),i=n(786067),a=n(635676),s=n(460615),c=n(778273),l=n(159121),u=n(386409),d=n(113165),_=n(654612),p=n(896011),h=n(486125),f=n(850167),m=n(325489),v=n(635093),g=n(363604),y=n(982452),E=n(830104),w=n(26330),b=n(961540),C=n(674402),S=n(962857),T=n(533304),A=n(19331),D=n(523459),P=n(173674),O=n(898966);function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function R(){window.vkLastNav=Date.now(),window.vkTabLoaded=Date.now()}function M(e){var t=[(0,r.ge)("dev_top_nav_wrap"),(0,r.ge)("page_header_wrap")];(0,o.each)(t,(function(t,n){n&&(0,r.setStyle)(n,e)}))}function L(e){window.__leftMenu&&window.__leftMenu.handleUpdateRequest(e)}function x(e,t,n,s,c){var l="",u="",d='<span class="inl_bl left_count_sign"></span>',_="reqs"===n||n&&n.substr&&"spr"===n.substr(0,3)?5:3,p=(0,r.geByClass1)("left_count_wrap",e);p.classList.toggle("left_count_wrap--highlighted",s);var h=(0,r.hasClass)((0,r.geByClass1)("left_row",e,"a"),"left_nav_over"),f=(0,r.geByClass1)("left_count",e,"span"),m=(0,r.val)(f);t&&((l=t.toString()).length>_&&(u=' title="'+(0,o.stripHTML)((0,i.langNumeric)(t,"%s",!0))+'"',l=".."+l.substr(l.length-_)),d=`<span class="inl_bl left_count" ${u}>${l}</span>`),(0,A.partConfigEnabled)("top_convo_list")&&"msg"===n&&window.TopMessenger&&window.TopMessenger.handleCounterUpdate(c);var v=function(){(0,r.val)(p,d),(t?r.removeClass:r.addClass)(p,"left_void"),(0,r.setStyle)(p,{opacity:""})};if(m||h)if(l)(0,a.animateCount)(f,l,{str:"auto",onDone:v});else if(h){var g=bodyNode.appendChild((0,r.se)('<span class="left_count_wrap"><span class="inl_bl left_count_sign"></span></span>'));g.classList("left_count_wrap--highlighted",s);var y=(0,r.getSize)((0,r.domFC)(g))[0];(0,r.re)(g),m&&"."===m.charAt(0)&&(0,r.val)(f,m.replace("..","")),(0,a.animate)(f,{width:y},100,v)}else(0,a.animate)(p,{opacity:0},100,v);else v(),(0,r.setStyle)(p,{opacity:0}),(0,a.animate)(p,{opacity:1},100)}function N(e,t,n){void 0===e.counts&&(e.counts={}),e.counts[t]=n}function B(e,t,n,i){var a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5?arguments[5]:void 0,c=(0,o.intval)(t),l=Math.max(0,c);if(N(window.vk,e,c),"ntf"===e)return window.TopNotifier.setCount(l),void window.TopNotifier.createNewEventsBox(l);if(e!==C.MARKET_EVENT_COUNTER_SECTION_ID){window.vk.onSetCount&&window.vk.onSetCount(e,t);var u=(0,r.ge)("l_"+e);if(u&&(x(u,l,e,!!a&&"msg"===e&&(0,A.partConfigEnabled)("mail_unread_counter_highlight"),"msg"===e?s:0),i&&n)){var d=c>0&&i?"?"+i:"";u.firstChild.href="/"+n+d}var _=(0,r.hasClass)((0,r.domFC)(u),"left_nav_over"),p=c>=0;!p&&_||(0,r.toggle)(u,p),"market_orders"===e&&u&&u.classList.remove("unshown")}else(0,C.updateMarketMenuEventCounter)(`#${e}`,t)}function U(e){vk.id=e.id,e.body_class!==bodyNode.className&&(bodyNode.className=e.body_class||""),(0,g.updateSTL)(),L(!0),void 0!==e.pvbig&&(vk.pvbig=e.pvbig),void 0!==e.pvdark&&(vk.pvdark=e.pvdark),cur._level=e.level,vk.id&&vk.id%1e3==1&&setTimeout((function(){window.scrollmarked={},(0,s.statlogsValueEvent)("page_scroll",0,cur.module,"0")}),300),j(e);var t=(0,r.ge)("mvk_footer_lnk");if(t){var n=`https://m.${(0,b.getHostName)()}/`;t.firstChild.href=e.mvklnk||n}if(vk.nophone=(0,o.intval)(e.nophone),vk.staticheader=(0,o.intval)(e.staticheader),vk.id){var i=(0,r.ge)("left_blocks");i&&(i.innerHTML=e.leftblocks||"")}"leftads"in e&&0!==e.leftads&&window.__adsSet(e.leftads,e.ads_section||"",e.ads_can_show,e.ads_showed);var a=locProtocol+"//"+location.host+"/";e.loc&&("?"===e.loc.charAt(0)?a+=nav.strLoc:a+=e.loc);var l=document.URL===a?"":document.URL;setTimeout(T.updateCounters.pbind(a,l),10);var u=e.counters;if(u.length){var d="",_="";(0,o.intval)(u[9])>0?(d="adsmarket",_="act=overview&status=-1"):(0,o.intval)(u[9])<-1?(u[9]=1,d="ads",_="act=a_comeback_office_redirect"):d="ads?act=office&last=1";var p=(0,r.ge)("l_set"),h=p&&p.nextSibling||!1,f=["fr","ph","vid","msg","nts","gr","vkp","wsh","ap","ads","ntf","fav","doc","apm","mk"],m=["friends","albums"+vk.id,"video","","notes","groups","vkpay","gifts.php?act=wishlist","apps",d,"feed"+((0,r.ge)("l_nwsf")?"?section=notifications":""),"pages","docs","apps_manage","market"],v=["","act=added","section=tagged","","act=comments","","tab=invitations","","",_,(0,r.ge)("l_nwsf")?"":"section=notifications","","","",""],y=!1;if(e.handlecnts){for(var E=0;E<f.length;E++)B(f[E],u[E],m[E],v[E]);for(var w=h.nextSibling;w;w=w.nextSibling){if(w.tagName&&"li"===w.tagName.toLowerCase()&&(0,r.isVisible)(w)){y=!0;break}if((0,r.hasClass)(w,"more_div"))break}(y?r.show:r.hide)(h),function(e){if(!(0,o.isObject)(e))return;Object.entries(e).forEach((e=>{var t=I(e,2),n=t[0],r=t[1],i=document.getElementById("l_app"+(0,o.intval)(n));i&&x(i,(0,o.intval)(r))}))}(u[17]),setTimeout(c.updSeenAdsInfo,0)}else for(var C=0;C<f.length;C++)vk.counts[f[C]]=u[C]}}function F(e){e=e||{};var t=w.default.get("last_reloaded")||[];t.unshift((0,o.vkNow)());var n=t.length;return n>5&&(t.splice(5,n-5),n=5),w.default.set("last_reloaded",t),!!(5===n&&t[0]-t[4]<2e4)&&((0,l.topError)('<b>Reloading error</b>, please check internet connection, <b><a href="/page-777107_43991681">clear your cache</a></b> and restart your browser.<br>If problem remains, please <a href="/support?act=new">report it here</a>.',{dt:15,type:6,msg:"Reload error, from "+(e.from||0)+", forced "+(e.force||0)+", url "+(e.url||"")+", query "+(e.query||"")}),!0)}function W(e){for(var t=0,n=globalHistory.length;t<n;t++)if(globalHistory[t].loc===e){var r=globalHistory.splice(t,1)[0];H(r.cur),r.content.innerHTML="",--t,--n}}function V(e,t,n){if(_tbLink){var i=e;if(e=(e||"").replace(/^\//,""),_tbLink.loc=e,void 0===n&&(n=0,e))for(var a=0,s=globalHistory.length;a<s;a++)if(globalHistory[a].loc===e){n=1;break}if(i){try{_tbLink.style.maxWidth=_tbLink.parentNode.offsetWidth-35+"px"}catch(e){}(0,o.extend)(_tbLink,{href:"/"+e,innerHTML:t,fast:n}),(0,r.show)(_tbLink),window._stlWas=0}else(0,r.hide)(_tbLink);(0,u.updSideTopLink)(1)}}function H(e){if(e._back&&e._back.hide&&e===cur)for(var t in e._back.hide)if(e._back.hide.hasOwnProperty(t))try{e._back.hide[t]()}catch(e){try{console.log(e.stack)}catch(e){}}if(e.destroy&&e.destroy.length)for(var n in e.destroy)if(e.destroy.hasOwnProperty(n))try{e.destroy[n](e)}catch(e){try{console.log(e.stack)}catch(e){}}}function j(e){var t=(0,r.ge)("footer_wrap"),n=(0,r.ge)("page_layout"),i=(0,r.geByClass1)("TopHomeLink"),a=void 0===e.width?vk.width:e.width,s=void 0===e.width_dec?vk.width_dec:e.width_dec,c=void 0===e.width_dec_footer?vk.width_dec_footer:e.width_dec_footer;if(vk.noleftmenu===e.noleftmenu&&vk.nobottommenu===e.nobottommenu&&vk.width===e.width&&vk.width_dec_footer===e.width_dec_footer||(vk.noleftmenu!==e.noleftmenu&&e.noleftmenu&&(0,r.hide)("side_bar"),vk.nobottommenu!==e.nobottommenu&&(e.nobottommenu?(0,r.hide)("bottom_nav"):(0,r.show)("bottom_nav")),e.noleftmenu&&e.nobottommenu?t&&((0,r.addClass)(t,"simple"),t.style.width="auto"):t&&((0,r.removeClass)(t,"simple"),t.style.width=a-c+"px")),vk.notopmenu!==e.notopmenu&&(e.notopmenu?(0,r.hide)("quick_search","qsearch_border","top_search","top_invite_link","top_menu_wrap"):(0,r.show)("quick_search","qsearch_border","top_search","top_invite_link","top_menu_wrap")),i&&e.top_home_link_class&&vk.top_home_link_class!==e.top_home_link_class&&(i.className=e.top_home_link_class),n&&(a!==vk.width||s!==vk.width_dec)){(0,E.setGlobalCustomProperty)("--layout-width",a+"px"),(0,r.ge)("page_body").style.width=a-s+"px",(0,r.ge)("ts_wrap")&&(0,r.hasClass)((0,r.ge)("ts_wrap"),"vk")&&((0,r.ge)("ts_wrap").style.width=a-191+"px"),setTimeout(u.updSideTopLink.pbind(!0),0),setTimeout(g.updateSTL,0);try{_tbLink.style.maxWidth=_tbLink.parentNode.offsetWidth-35+"px"}catch(e){}}vk.noleftmenu===e.noleftmenu||e.noleftmenu||(0,r.show)("side_bar"),e.to&&(0,r.ge)("quick_login_to")&&(0,r.val)("quick_login_to",e.to),vk.noleftmenu=e.noleftmenu,vk.nobottommenu=e.nobottommenu,vk.top_home_link_class=e.top_home_link_class,vk.notopmenu=e.notopmenu,vk.width=a,vk.width_dec=s,vk.width_dec_footer=c,vk.body_class=e.body_class,vk.staticheader=(0,o.intval)(e.staticheader),vk.no_ads=e.no_ads,vk.ad_preview=e.ad_preview}function K(e,t,n){var i=e.z,a=e.f,s=e.w,c=(i||"").match(/^([a-z_]+)(-?\d+(?:_(?:-)?\d+)?)\/?(.*)/i);if(delete e.z,delete e.f,delete e.w,t||(t={}),(0,o.isEmpty)(e)){if(a&&((0,y.handleScroll)(a),void 0===i))return!1;if(t.hist)if(i||s){if(layerQueue.back("wiki",s,(c||{})[1],(c||{})[2]))return!1}else if(!1===i&&n.w&&layerQueue.back("wiki",n.w))return!1;if(s){var l="";if(!1===i)layers.fullhide(!!t.hist&&2);else{if(s.match(/^story([0-9\-]+)_(\d+)/))return(0,d.showStory)(s);if(s.match(/^narrative([0-9\-]+)_(\d+)(?:_(\d+))?/)){var u=I(s.match(/^narrative([0-9\-]+)_(\d+)(?:_(\d+))?/),4),g=u[1],E=u[2],w=u[3];return(0,d.showNarrative)(g,E,w,"",{source:"narrative_link"})}if(s.match(/^donut_payment(-\d+)/)){var b=nav.objLoc.source,C=Number(s.match(/^donut_payment(-\d+)/)[1]);return(0,f.showDonutSubscribePopup)(null,null,C,b,"",{type:"subscribe",params:{act:"subscribe_popup"}})}if("stories"===s){if(cur.storyLayer)return cur.storyLayer.doHide(),!1}else n||(n=(0,o.clone)(nav.objLoc)),s&&(n.w=s),a&&(n.f=a),delete n.z,nav.setLoc(n),nav.objLoc.ref&&(l=nav.objLoc.ref,delete nav.objLoc.ref)}return(0,f.showWiki)({w:s},"note_new"===s,!1,{onLoaded:i&&K.pbind({z:i},(0,o.extend)(t,{queue:1})),isZnav:1,customRef:l}),!1}if("giftbox"===i)return!(0,_.showBox)("/al_gifts.php",{act:"get_gift_box",mid:t.id||0,fr:t.is&&t.id!==vk.id?0:1,link:nav.objLoc[0]},{stat:["gifts.css","ui_controls.js","ui_controls.css"],cache:1},window.event);if("validatebox"===i)return!(0,p.validateMobileBox)({closeLink:1,onDone:()=>(0,r.ge)("change_phone_wrap").parentNode.removeChild((0,r.ge)("change_phone_wrap"))});if("upload_video"===i)return VideoUpload.showBox();if(i===O.MY_QUESTIONS_BOX_URL_PARAMETER){var T=window.nav.objLoc.ref;return T?(delete window.nav.objLoc.ref,nav.setLoc(window.nav.objLoc)):T="url",(0,D.showMyQuestionsBox)({ref:T}),!1}if(!1===i||!1===s){var k=!window.wkcur||!wkcur.shown||layers.fullhide!==WkView.hide;!layers.fullhide||!k&&!1!==s||t.asBox||(!t.hist||n.z||n.w||-1!==n[0].indexOf("/")||n[0].match(/^(photo|video)(-?\d+_\d+)$/)||layerQueue.clear(),layers.fullhide(!!t.hist&&2));var R=(0,h.curBox)();return R&&R.wkRaw&&R.hide(),!1}if(i&&c){var M=function(){return delete nav.objLoc.z,nav.setLoc(nav.objLoc),!0};switch(c[1]){case"photo":return(0,f.showPhoto)(c[2],c[3],(0,o.extend)(t,{onFail:M,noHistory:!0})),!1;case"albums":return(0,f.showAlbums)(c[2],(0,o.extend)(t,{onFail:M,noHistory:!0})),!1;case"album":return(0,f.showAlbum)(c[2],(0,o.extend)(t,{onFail:M,noHistory:!0})),!1;case"tag":case"photo_tag":return(0,f.showPhotoTags)(c[2],(0,o.extend)(t,{onFail:M,noHistory:!0})),!1;case"video":case"clip":var L=c[3],x=(0,o.extend)(t,{onFail:M,noLocChange:1,focusPlay:1});if(L){var N=[],B="";if((0,o.each)(L.split("/"),(function(e,t){0===t.indexOf("pl_")?B=t:N.push(t)})),L=N.join("/"),B){B=B.substr("pl_".length);var U=cur.currentModule?cur.currentModule():cur.module;x=(0,o.extend)(x,{playlistId:B,module:U,addParams:{force_no_repeat:1,show_next:1,playlist_id:B,show_all_videos:(0,o.intval)(cur.isCatalog&&(!window.VideoPlaylist||!VideoPlaylist.getList(B)))}})}}return"clip"===c[1]&&(x.shortVideo=1),(0,m.showVideo)(c[2],L,x),!1;case"single":return void 0===s&&stManager.add(["single_pv.css",jsc("web/single_pv.js")],(0,r.ge)(i).onclick),!1;case"accept_money":return(0,v.moneyTransferBox)(c[2],c[3]),!1;case"moneysend":var F=S.MoneyTransfer.showMoneyTransferBox({to_id:c[2],from:"public_link"},{},(e=>(F.hide(),setTimeout((0,_.showFastBox)(getLang("global_error"),e).hide,2e3),delete nav.objLoc.z,nav.setLoc(nav.objLoc),!0)));return!1;case"audio_playlist":var W=I(c[2].split("_"),2),V=W[0],H=W[1],j=t.context||"";return AudioUtils.showAudioPlaylist(V,H,c[3],j,void 0,t.onDone),!1;case"article_edit":return f.openArticleEditor.apply(null,c[2].split("_")),!1;case"podcast":return stManager.add([jsc("web/podcast.js"),"page.css"],(()=>{Podcast.show(null,c[2],null,"url")})),!1;case"apps_achievements":return stManager.add([jsc("web/apps_achievements.js")],(()=>{window.AppsAchievementsPage.showFriendAchievements(c[2])})),!1;case O.ASK_QUESTION_BOX_URL_PREFIX:var z=Number(c[2]),G=window.nav.objLoc.ref;return G?(delete window.nav.objLoc.ref,nav.setLoc(window.nav.objLoc)):G="url",(0,D.showAskQuestionBox)(z,{ref:G}),!1;case"call":var q=()=>{stManager.add(["notifier.js"],(()=>{var e,t=I(c[2].split("_"),2),n=t[0],r=t[1],o=r&&r<0?Number(r):null,i=()=>{var e;return null===(e=window.Calls)||void 0===e?void 0:e.call(Number(n),!1,void 0,P.CallStatSource.LINK,o)};(null===(e=window.Calls)||void 0===e?void 0:e.initialized)?i():setTimeout(i,1500),delete nav.objLoc.z,nav.setLoc(nav.objLoc)}))};return(0,A.partConfigEnabled)("calls_open_warning_box_on_call_by_link")?(0,_.showFastBox)({title:getLang("global_warning")},getLang("calls_are_you_sure_to_call_this_user"),getLang("global_share_button_call"),(()=>{window.curBox().hide(),q()}),getLang("global_close")):q(),!1}}}}},912322:(e,t,n)=>{"use strict";n(991181),n(296253),n(528120),n(286702);function r(e){e&&!e.prototype.forEach&&(Array.prototype.forEach?e.prototype.forEach=Array.prototype.forEach:e.prototype.forEach=function(e,t){t=t||window;for(var n=0;n<this.length;n++)e.call(t,this[n],n,this)})}Function.prototype.pbind=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(window),this.bind.apply(this,e)},Function.prototype.rpbind=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(window),this.rbind.apply(this,e)},Function.prototype.rbind=function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift(),r=t.shift();return function(){var o=Array.prototype.slice.call(arguments);return e.apply(n,t.concat(o)),r}},Function.prototype.bind||(Function.prototype.bind=function(){var e=this,t=Array.prototype.slice.call(arguments),n=t.shift();return function(){var r=Array.prototype.slice.call(arguments);return e.apply(n,t.concat(r))}}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),r(window.NodeList),r(window.HTMLCollection),!1===window.hasOwnProperty("origin")&&(window.origin=window.location.origin),"prepend"in Element.prototype||(Document.prototype.prepend=Element.prototype.prepend=function(e){this.insertBefore(e,this.firstChild)})},138974:(e,t,n)=>{"use strict";function r(){var e=null,t=window.getSelection();t.getRangeAt&&t.rangeCount&&(e=t.getRangeAt(0));var n=null,r=null,o=0,i=0,a=document.activeElement;return e&&("selectionStart"in a?(n=a,r=a,o=a.selectionStart,i=a.selectionEnd):t.rangeCount&&(n=e.startContainer,r=e.endContainer,o=e.startOffset,i=e.endOffset)),[e,n,o,r,i]}function o(e){var t=window.getSelection();return t.removeAllRanges(),t.addRange(e),e}function i(e,t,n,r){var i=document.createRange();return i.setStart(e,t),i.setEnd(n,r),o(i)}function a(e,t){if(t=t?t+"":"",!browser.msie&&document.execCommand)document.execCommand("insertHTML",!1,t);else if(e){e.deleteContents();var n=cf(t),r=n.lastChild;e.insertNode(n),r&&((e=e.cloneRange()).setStartAfter(r),e.collapse(!0),o(e))}return e}n.d(t,{rangeGet:()=>r,rangeCreate:()=>i,rangeInsert:()=>a})},803834:(e,t,n)=>{"use strict";n.d(t,{scrollToY:()=>s,scrollToTop:()=>c,scrollGetX:()=>l,scrollGetY:()=>u,disableBodyScroll:()=>d,enableBodyScroll:()=>_,isBodyScrollEnabled:()=>p});var r=n(386409),o=n(635676),i=n(315544);function a(){return bodyNode}function s(e,t,n,c,d){if(null==t&&(t=400),"ontouchstart"in document.documentElement&&(t=0),c||(e=Math.max(0,e-(vk.staticheader?0:(0,i.getSize)("page_header_cont")[1]))),(0,i.data)(a(),"tween")&&(0,i.data)(a(),"tween").stop(!1),(0,i.data)(htmlNode,"tween")&&(0,i.data)(htmlNode,"tween").stop(!1),window.scrollAnimation=!1,t){var _=function(){window.scrollAnimation=!1,2===n&&("profile"!=cur.module&&"public"!=cur.module&&"group"!=cur.module&&"groups"!=cur.module&&"event"!=cur.module||!window.Wall||Wall.scrollCheck(!1,void 0,!0),(0,r.updSideTopLink)()),"function"==typeof d&&d()};window.scrollAnimation=!0,(0,o.animate)(htmlNode,{scrollTop:e},{duration:t,transition:o.Fx.Transitions.sineInOut,onComplete:_}),(0,o.animate)(a(),{scrollTop:e},{duration:t,transition:o.Fx.Transitions.sineInOut,onComplete:_})}else{if(n&&2!==n){"profile"!=cur.module&&"public"!=cur.module&&"group"!=cur.module&&"event"!=cur.module||!window.Wall||Wall.scrollCheck(!1,e,!0);var p=u()-e;return Math.abs(p)>6&&s(e+(p>0?6:-6),0,2,!0),(0,r.updSideTopLink)(),clearTimeout(window.scrlToTO),void(window.scrlToTO=setTimeout(s.pbind(e,100,2,!0,d),0))}window.scroll(l(),e),"function"==typeof d&&d(),n||(0,r.updSideTopLink)()}}function c(e){return s(0,e)}function l(){return window.pageXOffset||scrollNode.scrollLeft||document.documentElement.scrollLeft}function u(){return window.pageYOffset||scrollNode.scrollTop||document.documentElement.scrollTop}function d(){a().style.overflow="hidden"}function _(){a().style.overflow="auto"}function p(){return"hidden"!==a().style.overflow}},469687:(e,t,n)=>{"use strict";n.d(t,{makeSharedState:()=>l});var r,o=n(40906),i="__SHARED_STATE_KEY";r=window.hasOwnProperty(i)?window.__SHARED_STATE_KEY:Object.create(null),Object.defineProperty(window,i,{configurable:!0,value:r});var a=()=>window.__SHARED_STATE_KEY,s=e=>a()[e],c={persistIfInitialized:!0},l=(e,t,n)=>{var r=(0,o.defaults)({},n,c),i=e in a(),l=s(e),u=i&&r.persistIfInitialized?l:t(l);((e,t)=>{a()[e]=t})(e,u);return()=>s(e)}},561697:(e,t,n)=>{"use strict";n.d(t,{staticManagerModuleName:()=>h,fillStaticFilesData:()=>C,initStaticManager:()=>S});n(796409),n(283946),n(991181),n(751876),n(59357),n(940851),n(296253),n(21466);var r,o=n(315544),i=n(159121),a=n(695724),s=n(726271),c=n(66433),l=n(85372),u=n(40906),d=n(209509),_={},p=12e4,h="static_manager";function f(){__debugMode&&(p=navigator.connection&&"4g"===navigator.connection.effectiveType?3e3:3e4)}var m=e=>"dist/"+e,v=e=>/\.js$/.test(e),g=e=>/\.css$/.test(e);function y(e){var t="/js/";return stTypes.fromLib[e]?t="/js/lib/":stTypes.fromCompiled&&stTypes.fromCompiled[e]?t="/"+m("web/"):/^lang\d/i.test(e)||stTypes.fromRoot[e]||-1!==e.indexOf("/")?0===e.indexOf("dist")&&(t="/"):t="/js/al/",t}function E(e){return stTypes.fromRoot[e]||e.includes("/")||e.match(/^[\w_-]+\.[0-9a-f]{20}\.css$/)?"":"al/"}function w(e,t,n){(0,c.logError)(t,{environment:h,breadcrumb:{message:String(n),category:d.customBreadcrumbCategory}}),(0,i.topMsg)(`Some problems with loading <b>${e}</b>...`,5),_[e]&&_[e]()}function b(e){return!v(e)&&!g(e)||function(e){for(var t=0;t<vk.stExcludedMasks.length;t++)if(-1!==e.indexOf(vk.stExcludedMasks[t]))return!0;return!1}(e)?"":(0===`${y(t=e)}${t}`.indexOf("dist/")||g(e))&&vk.stDomain||"";var t}function C(){(0,a.each)(StaticFiles,((e,t)=>{t.t=g(e)?"css":"js",t.n=e.replace(/[\/\.]/g,"_"),t.l=0,t.c=0}))}function S(){window.addEventListener("load",f),window.jsc=m,window.stQueue=_,window.stVersions||(window.stVersions={},window.stTypes={fromLib:{},fromRoot:{}},window.navMap={}),window.StaticFiles||(window.StaticFiles={}),function(){for(var e=0,t=Object.values(window.StaticFiles);e<t.length;e++)t[e].isLoading=Promise.resolve()}(),window.stManager||(window.stManager=r)}r={_addCss:function(e,t){var n=(0,o.ce)("style",{type:"text/css",media:"screen"}),r=(0,o.domNS)(t);return r?headNode.insertBefore(n,r):headNode.appendChild(n),n.sheet?n.sheet.insertRule(e,0):n.styleSheet&&(n.styleSheet.cssText=e),n},_srcPrefix:b,_add:function(e){if(StaticFiles[e]&&StaticFiles[e].isLoading)return StaticFiles[e].isLoading;var t=stVersions[e]||1,n=e.replace(/[\/\.]/g,"_"),o=b(e);return StaticFiles[e]={v:t,n,l:0,c:0},v(e)?function(e){var t=e.fileName,n=e.fileFullName,o=e.domainPrefix,i=y(t);StaticFiles[t].t="js";var a=(new Error).stack;if(t!==m("web/common_web.js")){var s=o+i+n;StaticFiles[t].src=s;var c=new Promise(((e,n)=>{if((0,l.loadScript)(s,(e=>{e&&(StaticFiles[t]=null,n(e))})),s.includes("dist/bundles/"))e();else{var r=setTimeout((()=>w(t,new Error(`${l.JS_LOAD_ERROR_TEXT} ${t}`),a)),p),o=t.replace(/^cmodules\//,"").replace(/^dist\//,"");_[o]=()=>{clearTimeout(r),e(),_[o]=null}}})).catch((e=>(w(t,e,a),Promise.resolve())));return StaticFiles[t].isLoading=c,c}setTimeout((()=>r.done(m("web/common_web.js"))),0)}({fileName:e,fileFullName:e+"?"+t,domainPrefix:o}):g(e)?function(e){var t=e.fileName,n=e.domainPrefix,r=E(t),o=n+(r=t.startsWith("dist/")?"/"+r:"/css/"+r)+t,i=(new Error).stack,a=(0,l.loadStyle)(o).catch((e=>w(t,e,i)));return StaticFiles[t].t="css",StaticFiles[t].isLoading=a,StaticFiles[t].src=o,a}({fileName:e,domainPrefix:o}):void 0},add:function(e,t){var n=[];for(var o in(0,a.isArray)(e)||(e=[e]),e)if(e.hasOwnProperty(o)){var i=e[o];if(i){i.includes("?")&&(i=i.split("?")[0]);var c="";v(i)?c=y(i):g(i)&&(c=E(i)),/^lang\d/i.test(i)?stVersions[i]=stVersions.lang:stVersions[c+i]||(stVersions[c+i]=1);var l=!1;if(window.stDeps){var d=c+i,_="/css/"+c+i,p="";window.stDeps[d]?p=d:window.stDeps[_]&&(p=_),p&&(l=!0,window.stDeps[p].forEach((e=>{n.push(r._add(e))})))}if(__debugMode&&!s.browser.iphone&&!s.browser.ipad&&i!==m("web/common_web.js")&&"common.css"!==i&&stVersions[i]>0&&stVersions[i]<1e9&&(stVersions[i]+=(0,a.irand)(1e9,2e9)),!l){var h=StaticFiles[i];h&&h.v==stVersions[i]?n.push(h.isLoading):n.push(r._add(i,h))}}}return Promise.all(n).then((e=>((0,u.isFunction)(t)&&t(e),e)))},done:function(e){var t,n,r=e;if(t=e,(void 0===(n=window.stDeps)?[]:n)[`${y(t)}${t}`])r=function(e){var t=window.stDeps,n=(void 0===t?[]:t)[`${y(e)}${e}`];return n[n.length-1]}(e);else if(function(e){return!!~e.indexOf("dist/internal/")}(e)&&(!StaticFiles[r]||1===StaticFiles[r].l)){var o=new RegExp(r.replace(/.js$/,".[0-9a-f]{20}.js")),i=!1;Object.keys(StaticFiles).forEach((e=>{o.test(e)&&!StaticFiles[e].l&&(i=e)})),i&&(r=i)}var a=r.replace(/^cmodules\//,"").replace(/^dist\//,"");_[a]&&_[a](),StaticFiles[r]&&(StaticFiles[r].l=1)}}},460615:(e,t,n)=>{"use strict";n.d(t,{statlogsValueEvent:()=>o.statlogsValueEvent,serviceGroups:()=>d,serviceGroupsCatalog:()=>_,serviceSearchCommunities:()=>p,serviceEvents:()=>h,serviceFriends:()=>f,serviceSearchPeople:()=>m,serviceFriendsFind:()=>v,serviceWallUsers:()=>g,serviceWallGroups:()=>y,serviceWall:()=>E,serviceSearchStatuses:()=>w,serviceNews:()=>b,serviceSearchAudio:()=>C,serviceBookmarksGroups:()=>S,serviceBookmarksUsers:()=>T,serviceAppsList:()=>A,serviceApps:()=>D,serviceAppsManage:()=>P,serviceSearchVideo:()=>O,serviceSearchClips:()=>I,serviceTopSearch:()=>k,servicePhotos:()=>R,serviceDocs:()=>M,serviceMessages:()=>L,serviceAudio:()=>x,serviceSearchAuto:()=>N,serviceManage:()=>B,serviceVideo:()=>U,serviceMarket:()=>F,serviceMarketV2:()=>W,serviceMarketGroups:()=>V,serviceUserFriends:()=>H,serviceGamesCatalog:()=>j,clickTypeJoinGroupOut:()=>ye,clickTypeLeaveGroupOut:()=>Ee,clickTypeAddFriendOut:()=>we,clickTypeRemoveFriendOut:()=>be,outOfSerpGroup:()=>Ce,outOfSerpProfile:()=>Se,blockNameOwn:()=>Ae,blockNameSearch:()=>De,blockNameSearchAudio:()=>Pe,blockNameSearchPeople:()=>Oe,blockNameSearchGroups:()=>Ie,blockNameSearchVideo:()=>ke,blockNameSearchClips:()=>Re,blockNameSearchMarket:()=>Me,blockNameSearchClassifieds:()=>Le,blockNameSearchPosts:()=>xe,tryLogOutOfSerpClick:()=>ut,removeOutOfSerpClickLogging:()=>dt,removeSearchPositionTracker:()=>ft,logLeftMenuClicks:()=>mt,saveSearchAttemptStats:()=>vt,generateQID:()=>gt});n(579665),n(95767),n(66108),n(991181),n(296253),n(530522),n(751876),n(59357);var r=n(695724),o=n(479957),i=n(522683);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||c(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=c(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var u={},d="groups",_="groups_catalog",p="search_communities",h="events",f="friends",m="search_people",v="friends_find",g="wall_users",y="wall_groups",E="wall",w="search_statuses",b="news",C="search_audio",S="bookmarks_groups",T="bookmarks_users",A="apps_list",D="apps",P="apps_manage",O="search_video",I="search_clips",k="top_search",R="photos",M="docs",L="messages",x="audio",N="search_auto",B="manage",U="video",F="market",W="market_v2",V="market_groups",H="user_friends",j="games_catalog",K="",z="tap",G="join_group",q="leave_group",Y="fave",$="unfave",X="write_msg",Q="add_friend",J="remove_friend",Z="restore_friend",ee="show_photo",te="add",ne="remove",re="play",oe="pause",ie="open_artist",ae="open_author_group",se="open_author_user",ce="open_author",le="open_store",ue="show_similar",de="search_by_tag",_e="edit",pe="like",he="comment",fe="share",me="mark_as_spam",ve="stats",ye="join_group_out",Ee="leave_group_out",we="add_friend_out",be="remove_friend_out",Ce="group",Se="profile",Te="",Ae="own",De="search",Pe="search_audio",Oe="search_people",Ie="search_groups",ke="search_video",Re="search_clips",Me="search_market",Le="search_classifieds",xe="search_posts",Ne="own_playlists",Be="global_clips",Ue="own_audios",Fe="search_artists",We="search_playlists",Ve="search_global_playlists",He="search_audios",je="own_conversations",Ke="own_messages",ze="own_albums",Ge="own_videos",qe="video_playlists",Ye="search_videos",$e="serps",Xe="SERPS_LOGS_DATA_LOCK",Qe="",Je="user",Ze="group",et="event",tt="public",nt="grid",rt="list";function ot(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,c=0,l="",u=0,d=1,_=0,p=0;return e&&(isArray(n)||(n=[n]),n.some((n=>{var h,f=e.classList.contains(n)?e:gpeByClass(n,e),m=0;if(f&&(h=r?bodyNode.querySelectorAll(r):f.parentNode.children)){if((c=[...h].indexOf(f)+1)&&o)for(var v in o)if(o.hasOwnProperty(v)){var g=bodyNode.querySelectorAll(o[v]);if(g){var y=[...g].indexOf(f)+1;if(y){u=y,l=v;break}}d++,m++}if(i){var E,w=s(i);try{for(w.s();!(E=w.n()).done;){var b=E.value,C=gpeByClass(b,e);C&&(d=C.getAttribute("data-block-num"))}}catch(e){w.e(e)}finally{w.f()}}var S=a(t(f,m),2);return _=S[0],p=S[1],!0}}))),[c,_,p,l,u,d]}function it(e,t,n,r,o,i,s){if(u[e]){var c=s.target;if(c&&c.classList)switch(e){case d:return void function(e,t,n,r,o,i){if(!t)return;var s=i.classList,c=i.outerHTML,l=i.tagName,u=a(ot(i,(e=>{var t=e.getAttribute("id")||e.getAttribute("data-id");return[0,"-"+(t=t?t.replace("gl_groups","").replace("gl_admin",""):0)]}),["_gl_row","search_row"],"#groups_list_tab_groups ._gl_row, #groups_list_search_wrap ._gl_row, #results .search_row, #groups_list_search_wrap .search_row",{[Ae]:"#groups_list_tab_groups ._gl_row",[De]:"#groups_list_search_wrap ._gl_row, #groups_list_search_wrap .search_row"}),5),d=u[1],_=u[2],p=u[3],h=u[4];if(!h)return;p===Ae&&(r=0,o="");var f=K;if(s.contains("group_row_title")||s.contains("group_row_img")||s.contains("highlight")||s.contains("search_item_img")||"A"===l&&-1!==c.indexOf("return nav.go")){var m=gpeByClass("group_list_row",i)||gpeByClass("groups_row",i);if(!m)return;if(m.hasAttribute("data-clicked"))return;m.setAttribute("data-clicked",!0),f=z}(s.contains("flat_button")&&!s.contains("secondary")||s.contains("search_sub_button"))&&(f=G);(s.contains("flat_button")&&s.contains("secondary")||s.contains("search_unsub_button"))&&(f=q);if(p===Ae&&-1!==c.indexOf("GroupsList.subscribe")){if(s.contains("ui_actions_menu"))return;f=G,!cur.scrollList.deleted[-_]&&(f=q)}if(p===Ae&&-1!==c.indexOf("GroupsList.toggleFave")){if(s.contains("ui_actions_menu"))return;f=Y,"1"===i.getAttribute("data-value")&&(f=$)}if(f===K)return;lt(),f===z&&ct(Ce,e,p,h,n,t,_,d,r,o);_t(e,p,h,f,n,t,_,d,r,o,Qe)}(e,t,n,r,o,c);case p:return void function(e,t,n,r,o,i,s){if(!t)return;var c=s.classList,l=s.outerHTML,u=s.tagName,d=a(ot(s,(e=>{var t=e.getAttribute("data-id");return t||(t=0),[0,"-"+t]}),"search_row","#results .search_row"),3),_=d[0],p=d[1],h=d[2];if(!_)return;var f=K;if(c.contains("search_item_img")||c.contains("highlight")||"A"===u&&-1!==l.indexOf("return nav.go")){var m=gpeByClass("groups_row",s);if(!m)return;if(m.hasAttribute("data-clicked"))return;m.setAttribute("data-clicked",!0),f=z}c.contains("search_sub_button")&&(f=G);c.contains("search_unsub_button")&&(f=q);if(f===K)return;lt(),f===z&&ct(Ce,e,Te,_,n,t,h,p,r,o);_t(e,Te,_,f,n,t,h,p,r,o,Qe,"",i)}(e,t,n,r,o,i,c);case _:return void function(e,t,n,r,o,i){if(!t)return;var s=i.classList,c=i.outerHTML,l=i.tagName,u=a(ot(i,(e=>{var t=e.getAttribute("data-id");return t||(t=0),[0,"-"+t]}),"search_row","#results .search_row"),3),d=u[0],_=u[1],p=u[2],h=K;if(s.contains("search_item_img")||s.contains("highlight")||"A"===l&&-1!==c.indexOf("return nav.go")){var f=gpeByClass("groups_row",i);if(!f)return;if(f.hasAttribute("data-clicked"))return;f.setAttribute("data-clicked",!0),h=z}s.contains("search_sub_button")&&(h=G);s.contains("search_unsub_button")&&(h=q);if(h===K)return;lt(),h===z&&ct(Ce,e,Te,d,n,t,p,_,r,o);_t(e,Te,d,h,n,t,p,_,r,o,Qe)}(e,t,n,r,o,c);case h:return void function(e,t,n,r,o,i){var s=i.classList,c=i.outerHTML,l=i.parentElement?i.parentElement.classList:null,u=a(ot(i,(e=>{var t=e.getAttribute("data-id");return t||(t=0),[0,"-"+t]}),"search_row","#groups_list_in_tab_search_all .search_row"),3),d=u[0],_=u[1],p=u[2];if(!d)return;var h=K;if(s.contains("search_item_img")||-1!==c.indexOf("return nav.go")&&l&&l.contains("title")){var f=gpeByClass("search_row",i);if(!f)return;if(f.hasAttribute("data-clicked"))return;f.setAttribute("data-clicked",!0),h=z}s.contains("search_sub_button")&&(h=G);s.contains("search_unsub_button")&&(h=q);if(h===K)return;lt(),h===z&&ct(Ce,e,Te,d,n,t,p,_,r,o);_t(e,Te,d,h,n,t,p,_,r,o,Qe)}(e,t,n,r,o,c);case f:case H:return void function(e,t,n,r,o,i){var s=i.classList,c=i.outerHTML,l=i.tagName,u=a(ot(i,(e=>{var t=e.getAttribute("id");return[0,t=t?t.replace("friends_user_row",""):0]}),"friends_user_row","#list_content .friends_user_row, #friends_search_cont .friends_user_row",{[Ae]:"#list_content .friends_user_row",[De]:"#friends_search_cont .friends_user_row"}),5),d=u[1],_=u[2],p=u[3],h=u[4];if(!h)return;var f=K;p===Ae&&-1!==c.indexOf("showWriteMessageBox")&&(f=X);p===Ae&&-1!==c.indexOf("deleteFriend")&&(f=J);p===Ae&&s.contains("friends_restore_link")&&(f=Z);s.contains("ui_zoom_icon")&&(f=ee);p===De&&i.id&&-1!==i.id.indexOf("friends_subsc")&&(f=Q);p===De&&i.id&&-1!==i.id.indexOf("friends_unsubsc")&&(f=J);if(s.contains("friends_photo_img")||p===Ae&&"A"===l&&-1!==c.indexOf("return nav.go")||p===De&&"A"===l&&0===s.length){var m=gpeByClass("friends_user_row",i);if(!m)return;if(m.hasAttribute("data-clicked"))return;m.setAttribute("data-clicked",!0),f=z}if(f===K)return;lt(),f===z&&ct(Se,e,p,h,n,t,_,d,r,o);_t(e,p,h,f,n,t,_,d,r,o,Qe)}(e,t,n,r,o,c);case v:return void function(e,t,n,r,o,i){var s=i.classList,c=i.outerHTML,l=i.parentElement?i.parentElement.classList:null;if(!t)return;var u=a(ot(i,(e=>[0,e.getAttribute("data-id")||0]),"search_row","#results .search_row"),3),d=u[0],_=u[1],p=u[2];if(!d)return;var h=K;if(s.contains("search_item_img")||-1!==c.indexOf("return nav.go")&&l&&l.contains("name")){var f=gpeByClass("people_row",i);if(!f)return;if(f.hasAttribute("data-clicked"))return;f.setAttribute("data-clicked",!0),h=z}s.contains("search_sub_button")&&(h=Q);s.contains("search_unsub_button")&&(h=J);if(h===K)return;lt(),h===z&&ct(Se,e,Te,d,n,t,p,_,r,o);_t(e,Te,d,h,n,t,p,_,r,o,Qe)}(e,t,n,r,o,c);case m:return void function(e,t,n,r,o,i,s){var c=s.classList,l=s.outerHTML,u=s.parentElement?s.parentElement.classList:null;if(!t)return;var d=a(ot(s,(e=>[0,e.getAttribute("data-id")||0]),"search_row","#results .search_row"),3),_=d[0],p=d[1],h=d[2];if(!_)return;var f=K;if(c.contains("search_item_img")||-1!==l.indexOf("return nav.go")&&u&&u.contains("name")){var m=gpeByClass("people_row",s);if(!m)return;if(m.hasAttribute("data-clicked"))return;m.setAttribute("data-clicked",!0),f=z}c.contains("search_sub_button")&&(f=Q);c.contains("search_unsub_button")&&(f=J);if(f===K)return;lt(),f===z&&ct(Se,e,Te,_,n,t,h,p,r,o);_t(e,Te,_,f,n,t,h,p,r,o,Qe,"",i)}(e,t,n,r,o,i,c);case N:return void function(e,t,n,r,o,i,s){var c=s.classList,l=s.tagName,u=s.outerHTML,d=ot(s,(e=>{var t="",n=e.classList;if(n.contains("_audio_row"))t=e.getAttribute("data-full-id");else{if(n.contains("people_row"))return[0,t=e.getAttribute("data-id")||0];if(n.contains("groups_row"))return[0,"-"+(t=e.getAttribute("data-id")||0)];n.contains("_video_item")?t=e.getAttribute("data-id"):n.contains("ShortVideoGridItem")?t=(t=e.getAttribute("href")||"").replace("/clip",""):n.contains("SearchProduct--marketDefault")?t=(t=e.getAttribute("data-stat-item")||"").replace("market_item|","").replace("|","_"):n.contains("SearchProduct--classifiedsDefault")?t=(t=e.getAttribute("data-stat-item")||"").replace("classifieds_item|","").replace("|","_"):n.contains("_post")&&(t=(t=e.getAttribute("id")||"").replace("post",""))}return t&&t.indexOf("_")?t.split("_"):[0,t]}),["_audio_row","search_row","_video_item","ShortVideoGridItem","SearchProduct--marketDefault","SearchProduct--classifiedsDefault","_post"],"\n      ._search_results ._audio_row,\n      ._search_results .search_row,\n      ._search_results ._video_item,\n      ._search_results .ShortVideoGridItem,\n      .MarketSearchProducts .SearchProduct--marketDefault,\n      .ClassifiedsSearchProducts .SearchProduct--classifiedsDefault,\n      #results ._post\n    ",{[Pe]:"._search_results ._audio_row",[Oe]:"._search_results .people_row",[Ie]:"._search_results .groups_row",[ke]:"._search_results ._video_item",[Re]:"._search_results .ShortVideoGridItem",[Me]:".MarketSearchProducts .SearchProduct--marketDefault",[Le]:".ClassifiedsSearchProducts .SearchProduct--classifiedsDefault",[xe]:"#results ._post"},["search_audio_media","search_people_media","search_communities_media","search_video_media","search_clips_media","search_market_media","search_classifieds_media"]),_=a(d,6),p=_[1],h=_[2],f=_[3],m=_[4],v=_[5];if(f===xe){for(var g=0,y=ge("search_auto_rows"),E=0;E<y.children.length;++E){var w=y.children[E],b=intval(w.getAttribute("data-block-num"));g=Math.max(g,b)}v=g+1}if(!m)return;var C=K;switch(f){case ke:c.contains("icon_add")&&(C=te),c.contains("icon_added")&&(C=ne),(c.contains("video_thumb_play")||c.contains("video_item_controls")||c.contains("video_item_title"))&&(C=re),c.contains("al_need_login")&&(C=ie),c.contains("group_link")&&(C=ae),c.contains("mem_link")&&(C=se);break;case Pe:(c.contains("audio_row__play_btn")||c.contains("audio_row__performer_title")||c.contains("audio_row__performers")||c.contains("audio_row__title")||c.contains("audio_row__title_inner")||c.contains("audio_row__title_inner_subtitle")||c.contains("audio_row__inner")||c.contains("audio_player__place")||c.contains("audio_row__action_next"))&&(C=re),gpeByClass("audio_row__play_btn_icon--play",s)&&(C=re),gpeByClass("audio_row__play_btn_icon--pause",s)&&(C=oe),gpeByClass("audio_row__action_add",s)&&(C=te),"A"===l&&(C=ie);break;case Oe:"A"===l&&-1!==u.indexOf("searcher.subscribe")&&(C=J),c.contains("add_btn")&&(C=Q),(c.contains("search_item_img")||gpeByClass("name",s))&&(C=z,ct(Se,e,f,m,n,t,h,p,r,o));break;case Ie:(c.contains("search_item_img")||gpeByClass("title",s)||"A"===l&&-1!==u.indexOf("return nav.go"))&&(C=z,ct(Ce,e,f,m,n,t,h,p,r,o));break;case Re:C=re;break;case Me:(c.contains("SearchProductImage__img")||c.contains("SearchProduct__title"))&&(C=z),c.contains("SearchProduct__storeName")&&(C=le);var S=gpeByClass("SearchProduct__fav",s);if(S){var T=Array.from(S.children).find((e=>e.className.includes("favorite_outline")));C=T?Y:$}break;case Le:(c.contains("SearchProductImage__img")||c.contains("SearchProduct__title"))&&(C=z);var A=gpeByClass("SearchProduct__fav",s);if(A){var D=Array.from(A.children).find((e=>e.className.includes("favorite_outline")));C=D?Y:$}break;case xe:gpeByClass("post",s,"div#results")&&(C=z)}if(C===K)return;_t(e,f,m,C,n,t,h,p,r,o,Qe,"",i,v)}(e,t,n,r,o,i,c);case S:return void function(e,t,n,r,o,i){var s=i.classList,c=i.outerHTML,l=a(ot(i,(e=>{var t=e.getAttribute("data-id");return t||(t=0),[0,t]}),"_bookmark_page_item"),3),u=l[0],d=l[1],_=l[2];if(!u)return;var p=K;if(s.contains("group_link")||s.contains("bookmark_page_item__image")){var h=gpeByClass("_bookmark_page_item",i);if(!h)return;if(h.hasAttribute("data-clicked"))return;h.setAttribute("data-clicked",!0),p=z}(s.contains("ui_zoom")||s.contains("ui_zoom_icon"))&&(p=ee);-1!==c.indexOf("Bookmarks.removeBookmark")&&(p=$);if(p===K)return;lt(),p===z&&ct(Ce,e,Te,u,n,t,_,d,r,o);_t(e,Te,u,p,n,t,_,d,r,o,Qe)}(e,t,n,r,o,c);case T:return void function(e,t,n,r,o,i){var s=i.classList,c=i.outerHTML,l=a(ot(i,(e=>{var t=e.getAttribute("data-id");return t||(t=0),[0,t]}),"_bookmark_page_item"),3),u=l[0],d=l[1],_=l[2];if(!u)return;var p=K;if(s.contains("mem_link")||s.contains("bookmark_page_item__image")){var h=gpeByClass("_bookmark_page_item",i);if(!h)return;if(h.hasAttribute("data-clicked"))return;h.setAttribute("data-clicked",!0),p=z}(s.contains("ui_zoom")||s.contains("ui_zoom_icon"))&&(p=ee);-1!==c.indexOf("Bookmarks.removeBookmark")&&(p=$);if(p===K)return;lt(),p===z&&ct(Se,e,Te,u,n,t,_,d,r,o);_t(e,Te,u,p,n,t,_,d,r,o,Qe)}(e,t,n,r,o,c);case C:!function(e,t,n,r,o,i){var s=i.classList,c=i.tagName;if(gpeByClass("ap_layer_wrap",i))return;if(!gpeByClass("search_results",i))return;var l=a(ot(i,(e=>{var t=e.getAttribute("data-full-id");return t&&t.indexOf("_")?t.split("_"):[0,0]}),"_audio_row"),3),u=l[0],d=l[1],_=l[2];if(!u)return;var p=K;(s.contains("audio_row__cover_icon")||s.contains("audio_row__performer_title")||s.contains("audio_row__title")||s.contains("audio_row__title_inner")||s.contains("audio_row__title_inner_subtitle")||s.contains("audio_row__inner")||s.contains("audio_player__place")||s.contains("audio_row__action_next")||s.contains("audio_row__performers"))&&(p=re);s.contains("audio_row__action_add")&&(p=te);"A"===c&&(p=ie);if(p===K)return;_t(e,Te,u,p,n,t,_,d,r,o,Qe)}(e,t,n,r,o,c);break;case O:return void function(e,t,n,r,o,i,s){var c=s.classList,l=a(ot(s,(e=>{var t=e.getAttribute("data-id");return t&&t.indexOf("_")?t.split("_"):[0,0]}),"_video_item","#results ._video_item"),3),u=l[0],d=l[1],_=l[2];if(!u)return;var p=K;(c.contains("video_thumb_play")||c.contains("video_item_controls")||c.contains("video_thumb_label_item")||c.contains("video_thumb_label")||c.contains("video_item_title")||c.contains("mv_subtitle"))&&(p=re);(c.contains("icon_add")||c.contains("video_thumb_action_add")||c.contains("VideoCard__action--add"))&&(p=te);c.contains("icon_added")&&(p=ne);c.contains("group_link")&&(p=ae);c.contains("al_need_login")&&(p=ie);c.contains("mem_link")&&(p=se);if(p===K)return;_t(e,Te,u,p,n,t,_,d,r,o,Qe,"",i)}(e,t,n,r,o,i,c);case I:return void function(e,t,n,r,o,i,s){var c=s.classList,l=a(ot(s,(e=>{var t=e.parentNode.getAttribute("href");return(t=t.replace("/clip",""))&&t.indexOf("_")?t.split("_"):[0,0]}),"ShortVideoGridItem__thumb",".ShortVideoGridItem__thumb"),3),u=l[0],d=l[1],_=l[2];if(!u)return;var p=K;c.contains("ShortVideoGridItem__thumb")&&(p=re);if(p===K)return;_t(e,Te,u,p,n,t,_,d,r,o,Qe,"",i)}(e,t,n,r,o,i,c);case x:return void function(e,t,n,r,o,i){var s=i.classList,c=i.tagName,l=i.parentElement?i.parentElement.classList:null,u=a(ot(i,((e,t)=>{var n="";switch(t){case 1:case 4:case 2:n=e.getAttribute("data-full-id");break;case 0:case 3:case 6:n=e.getAttribute("data-raw-id")}return n&&n.indexOf("_")?n.split("_"):n?[n,0]:[0,0]}),["_audio_pl_item","audio_block_small_item","_audio_row","_video_item"],"\n        ._audio_section__search ._audio_pl_item,\n        ._audio_section__search ._audio_row,\n        ._audio_section__search .audio_block_small_item,\n        ._audio_section__search .video_item,\n        ._audio_search_blocks ._audio_row,\n        ._audio_search_blocks ._video_item,\n        ._audio_search_blocks ._audio_pl_item,\n        ._audio_search_blocks .audio_block_small_item\n      ",{[We]:".CatalogBlock__search_global_albums ._audio_pl_item",[Ue]:".CatalogBlock__search_owned_audios ._audio_row",[He]:".CatalogBlock__search_global_audios ._audio_row",[Fe]:".CatalogBlock__search_global_artists .audio_block_small_item",[Be]:".CatalogBlock__search_global_clips .video_item",[Ne]:'._audio_page_block__playlists_items[data-audio-context="search_owned_playlist"] ._audio_pl_item',[Ve]:".CatalogBlock__search_global_playlists ._audio_pl_item"}),5),d=u[1],_=u[2],p=u[3],h=u[4];if(!h)return;var f=K;s.contains("audio_row__action_more")||l&&l.contains("audio_row__actions")||(f=re);s.contains("audio_row__action_next")&&(f=re);p===Ue&&s.contains("audio_row__action_recoms")&&(f=ue);p===Ue&&s.contains("audio_row__action_delete")&&(f=ne);p===Ue&&s.contains("audio_row__action_add")&&(f=te);p===He&&s.contains("audio_row__action_add")&&(f=te);p===Be&&s.contains("icon_add")&&(f=te);p===Be&&s.contains("icon_added")&&(f=ne);"A"===c&&(f=ie);if(f===K)return;_t(e,p,h,f,n,t,_,d,r,o,Qe)}(e,t,n,r,o,c);case k:return void function(e,t,n,r,o,i){var s=i.classList,c=i;s.contains("ts_contact")||(c=gpeByClass("ts_contact",i,"div#ts_cont_wrap"));var l=ot(c,(()=>[0,(c.id||"").replace("ts_contact","")]),"ts_contact","#ts_cont_wrap .ts_contact"),u=a(l,3),d=u[0],_=u[1],p=u[2];if(!d)return;var h=z,f=Qe;switch(c.getAttribute("hinttype")){case"h_friends":f=Je,s.contains("ts_contact_status")&&(h=X);break;case"h_mutual_friends":case"s_people":case"h_mail_peers":f=Je;break;case"h_vk_apps":case"h_apps":f="app";break;case"h_events":f=et;break;case"h_publics":f=tt;break;case"h_visited":case"s_groups":f=Ze}_t(e,Te,d,h,n,t,p,_,r,o,f)}(e,t,n,r,o,c);case U:return void function(e,t,n,r,o,i,s){var c=s.classList,l=a(ot(s,((e,t)=>{var n="";switch(t){case 1:case 3:n=e.getAttribute("data-id");break;case 2:n=e.getAttribute("data-name")}return n&&n.indexOf("_")?n.split("_"):[0,0]}),["video_playlist_item","_video_item","ui_gallery_item"],"\n        #video_layout_search .video_playlist_item,\n        #video_layout_search ._video_item,\n        #video_subtab_pane_search_promo_albums .ui_gallery_item\n      ",{[ze]:"#video_subtab_pane_search_albums .video_playlist_item",[Ge]:"#video_subtab_pane_search_videos ._video_item",[qe]:"#video_subtab_pane_search_promo_albums .ui_gallery_item",[Ye]:"#video_subtab_pane_search_global_videos ._video_item"}),5),u=l[1],d=l[2],_=l[3],p=l[4];if(!p)return;var h=K;(c.contains("icon_add")||c.contains("video_thumb_action_add")||c.contains("VideoCard__action--add"))&&(h=te);c.contains("icon_added")&&(h=ne);_===Ge&&c.contains("video_restore_act")&&(h=te);_===Ge&&c.contains("video_thumb_action_delete")&&(h=ne);(c.contains("video_item_title")||c.contains("video_item_controls")||c.contains("video_thumb_label_item")||c.contains("video_thumb_play"))&&(h=re);c.contains("group_link")&&(h=ae);c.contains("al_need_login")&&(h=ie);c.contains("mem_link")&&(h=se);h===K&&_===qe&&(c.contains("VideoCard__controlsOverlay")||c.contains("VideoCard__title")||c.contains("VideoCard__icon")||c.contains("VideoCard__controlsOverlayText"))&&(h=z);if(h===K)return;_t(e,_,p,h,n,t,d,u,r,o,Qe,"",i)}(e,t,n,r,o,i,c);case F:case V:return void function(e,t,n,r,o,i){var s=i.classList,c=nt;gpeByClass("market_row_line",i,".marketplace_content_search")&&(c=rt);var l=c===nt?"_market_row":"market_row_line",u=a(ot(i,(e=>[0,e.getAttribute("data-id")||0]),l,"#marketplace_content ."+l),3),d=u[0],_=u[1],p=u[2];if(!d)return;var h=K;switch(c){case rt:(s.contains("market_row_img")||s.contains("link"))&&(h=z),s.contains("market_favourite")&&!s.contains("selected")&&(h=Y),s.contains("market_favourite")&&s.contains("selected")&&(h=$),s.contains("mem_link")&&(h=se),s.contains("group_link")&&(h=ae);break;case nt:h=z,(s.contains("icon")||s.contains("fav"))&&(h=Y),s.contains("market_row_user_link")&&(h=se)}if(h===K)return;_t(e,Te,d,h,n,t,p,_,r,o,Qe)}(e,t,n,r,o,c);case W:return void function(e,t,n,r,o,i){var s=i.classList,c=a(ot(i,(e=>[+e.getAttribute("data-owner-id"),+e.getAttribute("data-id")]),"ClassifiedsCatalogProduct__serpItem"),3),l=c[0],u=c[1],d=c[2];if(!l)return;var _=K;s.contains("ClassifiedsCatalogProduct__serpTap")&&(_=z);s.contains("ClassifiedsCatalogProduct__serpAddFav")&&(_=Y);s.contains("ClassifiedsCatalogProduct__serpRemoveFav")&&(_=$);s.contains("ClassifiedsCatalogProduct__serpOwnerGroup")&&(_=ae);s.contains("ClassifiedsCatalogProduct__serpOwnerUser")&&(_=se);if(_===K)return;_t(e,Te,l,_,n,t,d,u,r,o,Qe)}(e,t,n,r,o,c);case L:return void function(e,t,n,r,o,i){var s=a(ot(i,(e=>{var t=e.getAttribute("data-peer");return t||(t=0),[0,t]}),"_im_dialog","._im_page_dcontent ._im_dialog",{[je]:"._im_page_dcontent ._im_dialog:not(._im_search)",[Ke]:"._im_page_dcontent ._im_dialog._im_search"}),5),c=s[1],l=s[2],u=s[3],d=s[4];if(!d)return;_t(e,u,d,z,n,t,l,c,r,o,Qe)}(e,t,n,r,o,c);case M:return void function(e,t,n,r,o,i){var s=i.classList,c=i.outerHTML,l=a(ot(i,(e=>{var t=e.getAttribute("id");return t&&(t=t.replace("docs_file_","")),t&&t.indexOf("_")?t.split("_"):[0,0]}),"_docs_item","#docs_list ._docs_item, #docs_search_list ._docs_item",{[Ae]:"#docs_list ._docs_item",[De]:"#docs_search_list ._docs_item"}),5),u=l[1],d=l[2],_=l[3],p=l[4];if(!p)return;var h=K;_===De&&s.contains("docs_add_row")&&(h=te);_===Ae&&s.contains("docs_delete_row")&&(h=ne);_===Ae&&-1!==c.indexOf("Docs.restoreItem")&&(h=te);_===Ae&&s.contains("docs_edit_row")&&(h=_e);(s.contains("highlight")||s.contains("docs_item_thumb_img")||s.contains("docs_item_icon")||s.contains("docs_item_name"))&&(h=z);-1!==c.indexOf("Docs.tagSearch")&&(h=de);if(h===K)return;_t(e,_,p,h,n,t,d,u,r,o,Qe)}(e,t,n,r,o,c);case A:case D:return void function(e,t,n,r,o,i){var s=a(ot(i,(e=>{var t=e.getAttribute("id");return[0,t=t?t.replace("app",""):0]}),"_apps_cat_row"),3),c=s[0],l=s[1],u=s[2];if(!c)return;var d=z;if(d===K)return;_t(e,Te,c,d,n,t,u,l,r,o,Qe)}(e,t,n,r,o,c);case j:return void function(e,t,n,r,o,i){var s=i.classList,c=a(ot(i,(e=>[0,e.getAttribute("data-app-id")||0]),"GameCatalogSearchCard"),3),l=c[0],u=c[1],d=c[2];if(!l)return;var _=K;(s.contains("GameCatalogSearchCard__screenshotImg")||s.contains("GameCatalogSearchCard__run")||s.contains("GameCatalogSearchCard__avatar")||s.contains("GameCatalogSearchCard__name"))&&(_=re);if(_===K)return;_t(e,Te,l,_,n,t,d,u,r,o,Qe)}(e,t,n,r,o,c);case R:return void function(e,t,n,r,o,i){var s=a(ot(i,(()=>{var e=i.getAttribute("href")||"",t=(e=e.replace("/photo","")).split("_");return 2!==t.length?[0,0]:[t[0],t[1]]}),"page_post_thumb_wrap","._feed_rows .page_post_thumb_wrap"),3),c=s[0],l=s[1],u=s[2];if(!c)return;_t(e,Te,c,z,n,t,u,l,r,o,Qe)}(e,t,n,r,o,c);case g:case y:case E:case w:case b:return void function(e,t,n,r,o,i){var s=i.classList,c=i.outerHTML;if(gpeByClass("replies",i,".post"))return;var l="feed_row",u="";e!==w&&e!==g&&e!==y||(l="post");e!==g&&e!==y||(u="#page_search_posts .post");var d=a(ot(i,(e=>{var t;if(e.classList.contains("post"))t=e;else{var n=e.getElementsByClassName("post");if(0===n.length)return[0,0];t=n[0]}if(!t)return[0,0];var r=(t.getAttribute("data-post-id")||"").split("_");return 2===r.length?r:[0,0]}),l,u),3),_=d[0],p=d[1],h=d[2];if(!_)return;var f=K;(gpeByClass("wall_text",i,".post")||s.contains("wall_text"))&&(f=z);(s.contains("author")||s.contains("post_img")||s.contains("copy_author")||s.contains("copy_post_img"))&&(f=ce);(s.contains("rel_date")||s.contains("published_by_date"))&&(f=z);(gpeByClass("like",i,".post")||s.contains("like"))&&(f=pe);(gpeByClass("comment",i,".post")||s.contains("comment"))&&(f=he);(gpeByClass("share",i,".post")||s.contains("share"))&&(f=fe);s.contains("ui_actions_menu_item")&&-1!==c.indexOf("bookmarkPost")&&(f=Y);s.contains("ui_actions_menu_item")&&-1!==c.indexOf("wall.markAsSpam")&&(f=me);if(f===K)return;_t(e,Te,_,f,n,t,h,p,r,o,Qe)}(e,t,n,r,o,c);case B:case P:return void function(e,t,n,r,o,i){var s=i.classList,c=i.tagName,l=a(ot(i,(e=>{var t=e.getAttribute("id");return[0,t=t?t.replace("app",""):0]}),"_apps_settings_row"),3),u=l[0],d=l[1],_=l[2];if(!u)return;var p=K;s.contains("apps_settings_stats")&&(p=ve);"A"!==c&&"img"!==c||(p=z);if(p===K)return;_t(e,Te,u,p,n,t,_,d,r,o,Qe)}(e,t,n,r,o,c)}}}function at(){var e={},t=i.vkLocalStorage.getItem($e);if(!t)return e;try{e=JSON.parse(t)}catch(t){e={}}return e}function st(e){if("locked"===i.vkLocalStorage.getItem(Xe))setTimeout((()=>st(e)),100);else{i.vkLocalStorage.setItem(Xe,"locked");try{e()}catch(e){}i.vkLocalStorage.setItem(Xe,"free")}}function ct(e,t,n,r,o,a,s,c,l,u){st((()=>{var d=Math.round(+new Date/1e3),_=at();_[e]=_[e]||{};var p=Object.keys(_[e]);if(p.length>=100){var h=p[0],f=_[e][h][0];p.forEach((t=>{var n=_[e][t][0];n<f&&(f=n,h=t)})),delete _[e][h]}_[e][s]=[d,t,n,r,o,a,c,l,u],i.vkLocalStorage.setItem($e,JSON.stringify(_))}))}function lt(){st((()=>{var e=at();if(e){var t=Math.round(+new Date/1e3);Object.keys(e).forEach((n=>{var r=e[n];Object.keys(r).forEach((e=>{var n=r[e][0];t-n>180&&delete r[e]})),e[n]=r,0===Object.keys(r).length&&delete e[n]})),i.vkLocalStorage.setItem($e,JSON.stringify(e))}}))}function ut(e,t,n){var r=at();r[e]=r[e]||{};var o=r[e][t];o&&(Math.round(+new Date/1e3)-o[0]>180?dt(!0,e,t):_t(o[1],o[2],o[3],n,o[4],o[5],t,o[6],o[7],o[8],Qe))}function dt(e,t,n){e&&st((()=>{var e=at();e[t]=e[t]||{},e[t][n]&&(delete e[t][n],i.vkLocalStorage.setItem($e,JSON.stringify(e)))}))}function _t(e,t,n,r,i,a,s,c,l,u,d){var _=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"",p=arguments.length>12&&void 0!==arguments[12]&&arguments[12],h=arguments.length>13&&void 0!==arguments[13]?arguments[13]:0;if(n){var f=-(new Date).getTimezoneOffset();(0,o.statlogsValueEvent)("search_position",e,d,r,t,n,p,c,s,a,f,i,l,u,_,h)}}function pt(e,t,n,r,i,a,s,c){var l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"",u=arguments.length>9&&void 0!==arguments[9]&&arguments[9],d=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,_=-(new Date).getTimezoneOffset();(0,o.statlogsValueEvent)("search_attempts",e,u,a,r,_,n,s,i,c,t,l,d)}function ht(){for(var e in u)u.hasOwnProperty(e)&&ft(e)}function ft(e){if(u[e]){var t=u[e];removeEvent(window,"click",t),delete u[e]}}function mt(e,t){var n=t||e.target.getAttribute("data-stats-key");n&&n.length>0&&window.statlogsValueEvent("submenu_clicks",0,n)}function vt(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"0",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"0",s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"",c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:Te,l=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",d=arguments.length>10&&void 0!==arguments[10]&&arguments[10],_=arguments.length>11&&void 0!==arguments[11]?arguments[11]:0;n=n?1:0,pt(e,c,o=o&&"0"!==o?o:gt(),r,a,n,i,s,l,d,_),u[e]&&ft(e);var p=it.pbind(e,r,o,i,s,d);u[e]=p,addEvent(window,"click",p,!1,!1,!0),cur.destroy||(cur.destroy=[]),cur.destroy.some((e=>e===ht))||cur.destroy.push(ht)}function gt(){return(0,r.rand)(-9223372035,9223372035).toFixed(0).concat((0,r.rand)(0,999999999).toFixed(0))}},363604:(e,t,n)=>{"use strict";n.d(t,{initStl:()=>p,updateSTL:()=>v});var r=n(386409),o=n(635429),i=n(447215),a=n(49535),s=n(803834),c=n(315544),l=n(695724),u=n(786067),d=!1,_=!0;function p(){var e={onclick:h,onmousedown:f,onmouseover:m,onmouseout:m};(0,c.val)(_stlLeft,'<div id="stl_bg"><nobr id="stl_text">'+(0,u.getLang)("global_to_top")+"</nobr></div>"),(0,l.extend)(_stlLeft,e),(0,l.extend)(_stlSide,e),window._stlBg=_stlLeft.firstChild,window._stlText=window._stlBg.firstChild,(0,a.addEvent)(window,"blur",(function(){window._wf=-1,d=!1})),(0,a.addEvent)(window,"focus",(function(){window._wf=1,d||(window.__afterFocus=!0,d=!0,setTimeout((function(){window.__afterFocus=!1}),10),_&&((0,r.sbWidth)(!0),(0,o.onBodyResize)(!0),_=!1))}))}function h(e){return(0,a.checkEvent)(e)||(0,a.cancelEvent)(e)}function f(e){if(e=e||window.event,!(0,a.checkEvent)(e)&&!__afterFocus)if(_stlWasSet&&_stlWas){var t=_stlWas;window._stlWas=0,(0,s.scrollToY)(t,0,!0,!0),(0,i.updateLeftMenu)(!0)}else 1===_stlBack?_tbLink.onclick():(window._stlWas=(0,s.scrollGetY)(),(0,s.scrollToY)(0,0,!0,!0),(0,i.updateLeftMenu)())}function m(e){var t=e?e.originalEvent||e:window.event||{},n="mouseover"===t.type&&(t.pageX>0||t.clientX>0);(0,c.toggleClass)(_stlLeft,"over",n),(0,c.toggleClass)(_stlLeft,"over_fast",n&&(0===_stlBack||_tbLink.fast)&&0===_stlWasSet),(0,c.toggleClass)(_stlSide,"over",n)}function v(){var e=window.innerWidth,t=document.documentElement.clientWidth,n=Math.max((0,l.intval)(e),(0,l.intval)(t));(0,c.toggleClass)(bodyNode,"no_stl",n<vk.width+280),(0,c.toggleClass)(bodyNode,"no_sett",n<vk.width+62)}},113165:(e,t,n)=>{"use strict";n.d(t,{showStory:()=>l,showNarrative:()=>u,storiesPreloadStatic:()=>_,sendMask:()=>h});var r=n(654612),o=n(486125),i=n(786067),a=n(635429),s=n(315544),c=!1;function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(cur.storiesNotSupported)return(0,r.showFastBox)((0,i.getLang)("global_error"),(0,i.getLang)("stories_bad_browser"));clearTimeout(c),c=setTimeout((function(){bodyNode.appendChild((0,s.ce)("div",{id:"stories_loader",innerHTML:(0,a.getProgressHtml)("stories_loader_pr","pr_baw pr_medium")+'<div class="back"></div>'}))}),1e3);var o=[jsc("web/stories.js"),"stories.css",jsc("web/emoji.js"),"videoview.js","videoplayer.css"];stManager.add(o,(function(){clearTimeout(c),(0,s.re)("stories_loader"),window.Stories.show(e,t,n)}))}function u(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=`narrative${t}`,a=`${e}${n=n?`_${n}`:""}&${i}/${r=r||`narrative${e}_${t}`}`;l(a,o)}var d=!1;function _(){d||cur.storiesNotSupported||(d=!0,stManager.add([jsc("web/stories.js"),"stories.css",jsc("web/story_publisher.js"),"photo_editor.css"]))}var p=!1;function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];p||(p=!0,ajax.post("al_stories.php",{act:"send_mask",mask_id:e,hash:t,is_short_video:n},{loader:!0,onDone:(e,t,n,a)=>{"cant_send"===e?(0,r.showFastBox)({title:t,width:460},n,a):(0,o.showDoneBox)((0,i.getLang)("stories_mask_sent")),p=!1},onFail:()=>(p=!1,(0,r.showFastBox)({title:(0,i.getLang)("global_box_error_title")},(0,i.getLang)("global_unknown_error")),!0)}))}},376852:(e,t,n)=>{"use strict";n.d(t,{showTooltip:()=>a,showTitle:()=>s,showHint:()=>c,hideAllTooltips:()=>l,destroyAllTooltips:()=>u});var r=n(315544),o=n(49535),i=n(695724);function a(e,t){(vk.loaded||t.noload)&&e&&(e.temphide||(e.temphide=function(){e.showing=!1},(0,o.addEvent)(e,"mouseout",e.temphide)),e.showing=!0,"loadingstat"!==e.tt&&(e.tt||(e.tt="loadingstat"),cur.cancelTooltip=!1,t.stat&&stManager.add(t.stat),stManager.add([jsc("web/tooltips.js"),"tooltips.css"],(function(){"loadingstat"===e.tt&&(e.tt=!1),e.showing&&!cur.cancelTooltip&&(!function(e){e.temphide&&((0,o.removeEvent)(e,"mouseout",e.temphide),(0,r.removeAttr)(e,"temphide"),(0,r.removeAttr)(e,"showing"))}(e),e.tt&&e.tt.el&&!t.force||(tooltips.create(e,t),t.onCreate&&t.onCreate()),tooltips.show(e,t))}))))}function s(e,t,n,o){e=(0,r.ge)(e);n||(n=[Math.round(20-(0,r.getSize)(e)[0]/2),8]);a(e,(0,i.extend)({text:function(){return t||e.getAttribute("data-title")},shift:n,black:1},o||{}))}function c(e,t){t=t||{};a(e=(0,r.ge)(e),(0,i.extend)({text:function(){return e.getAttribute("data-title")},dir:"auto",width:300,shift:[22,8]},t))}function l(e){tooltips.hideAll(e)}function u(e){tooltips.destroyAll(e)}},689433:(e,t,n)=>{"use strict";n.d(t,{topHeaderClose:()=>_,topHeaderClearClose:()=>p,default:()=>f});n(530522),n(66108),n(296253),n(991181),n(579665),n(95767),n(59357),n(751876),n(21466),n(283946);var r=n(315544),o=n(49535),i=n(695724),a=n(475632),s=n(786067),c=n(982452),l=n(460615);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(e){window.headerDestroy&&window.headerDestroy(),window.headerDestroy=e}function p(){delete window.headerDestroy}var h={searchLinkId:"ts_search_link",cache:{},lists:{},maxItems:8,init:function(){if(this.inited)return!1;var e=(0,r.ge)("ts_input"),t=(0,r.ge)("ts_cont_wrap");if(vk.id&&Chat.init(),!e)return!1;(0,o.addEvent)(e,"focus",(function(){h.deselect(),(0,i.trim)((0,r.val)(this))&&(0,r.addClass)(t.firstChild,"active"),h.toggleInput(!0)})),(0,o.addEvent)(e,"keydown",(function(n){switch(n.keyCode){case o.KEY.DOWN:case o.KEY.UP:h.moveSelection(n.keyCode),(0,o.cancelEvent)(n);break;case o.KEY.ENTER:var s=(0,r.geByClass1)("active",t);if(s)h.select(s,n);else{var c=(0,i.trim)((0,r.val)(this));c&&(e.blur(),h.clear(),h.toggleInput(!1),nav.go("/search?c[section]=auto&c[q]="+encodeURIComponent(c)))}(0,o.cancelEvent)(n);break;case o.KEY.TAB:h.clear(),h.toggleInput(!1),(0,a.cancelStackFilter)("top_search",!0)}})),vk.id&&((0,o.addEvent)(e,"keyup",(function(e){switch(e.keyCode){case o.KEY.DOWN:case o.KEY.UP:case o.KEY.ENTER:case o.KEY.ESC:(0,o.cancelEvent)(e);break;default:h.prepareRows((0,i.trim)((0,r.val)(this)))}})),(0,o.addEvent)(e,"paste",(function(){setTimeout((function(){h.prepareRows((0,i.trim)((0,r.val)(e)))}),10)})),(0,o.addEvent)(document,"mousedown",(function(e){(0,o.checkKeyboardEvent)(e)||(0,r.domClosest)("top_audio_layer_place",e.target)||(0,r.domClosest)("_ap_layer__close",e.target)||(0,r.domClosest)("layer_wrap",e.target)||(0,r.domClosest)("PortalNavigation",e.target)||(0,r.domClosest)("PortalNavigationDropdown",e.target)||_()})),this.inited=!0)},clear:function(){window.tooltips&&tooltips.destroyAll((0,r.ge)("ts_cont_wrap"));var e=(0,r.ge)("ts_input");e&&((0,r.val)(e,""),e.blur(),this.prepareRows())},select:function(e,t,n){if((0,o.checkEvent)(t))return!0;var a,s,c=(0,r.ge)("ts_input"),l=(0,i.trim)((0,r.val)(c)).length,u=e.getAttribute("hinttype");if(this.clear(),_(),l||c.blur(),n&&(0,r.hasClass)(t.target,"ts_contact_status"))return ajax.post("al_search.php",{act:"save_metrics",ql:l,mk:"chat_box"}),(null===(a=window)||void 0===a||null===(s=a.reforgedME)||void 0===s?void 0:s.selectPeer)?window.reforgedME.selectPeer(n,"global_search"):this.writeBox(n),!1;var d=nav.go(e,t,{params:{search_string:cur.tsStr||""}});return ajax.post("al_search.php",{act:"save_metrics",ql:l,mk:u}),d},deselect:function(){var e=(0,r.ge)("ts_cont_wrap");(0,i.each)((0,r.geByClass)("active",e),((e,t)=>(0,r.removeClass)(t,"active")))},itemOver:function(e,t,n){1===t&&h.deselect();var o=(0,i.inArray)(e.getAttribute("hintType"),["h_friends","h_correspondents","h_chats"]);(0,r.toggleClass)(e,"write",o),(0,r.toggleClass)(e,"active",t)},moveSelection:function(e){var t,n=(0,r.ge)("ts_cont_wrap"),i=(0,r.geByClass1)("active",n);switch(e){case o.KEY.UP:t=!!i&&(this.getNextNode(i,-1,"a")||i);break;case o.KEY.DOWN:t=i?this.getNextNode(i,1,"a")||i:n.firstChild}return this.deselect(),t&&(0,r.addClass)(t,"active"),!1},getNextNode:function(e,t,n){for(var o=e,i=(0,r.domPN)(e);;){if((o=t>0?(0,r.domNS)(o):(0,r.domPS)(o))||(o=t>0?(0,r.domFC)(i):(0,r.domLC)(i)),n&&o.tagName&&o.tagName.toLowerCase()===n||!n&&o)return o;if(o===e)return!1}},toggleInput:function(e){e=!!e;var t=(0,r.ge)("ts_cont_wrap");(0,r.isVisible)(t)!==e&&((0,r.toggle)("ts_cont_wrap",e),e&&(0,a.cancelStackPush)("top_search",(function(){var e=(0,r.ge)("ts_input");h.toggleInput(!1),e.blur()}),!0))},getList:function(e){switch(e){case"friends":return(isObject(this.lists.friends)&&!(0,i.isEmpty)(this.lists.friends)?this.lists.friends:this.topFriends)||{};case"publics":case"events":case"groups":case"apps":case"chats":case"search":return this.lists[e]||{}}return{}},onlines:function(){return window.curFastChat&&curFastChat.onlines||this.lists.onlines||{}},initFriendsList:function(){if(h.friendsLoaded)return!1;if(cur.initingFL||vk.isBanned||!vk.id)return!1;var e=function(){if(h.friendsLoaded)return!1;cur.initingFL=!0,ajax.post("al_search.php",{act:"get_pages"},{cache:1,onDone:function(e){delete cur.initingFL,h.friendsLoaded||((0,i.each)(e,(function(e,t){h.lists[e]=t,"onlines"!==e&&h.updateCache(e)})),h.friendsLoaded=!0,(0,r.val)("ts_input")||h.prepareRows(""))},onFail:function(){delete cur.initingFL}})},t=h.getList("friends");(0,i.isEmpty)(t)?(cur.initingFL=!0,ajax.post("al_search.php",{act:"get_top_friends"},{cache:1,onDone:function(t){delete cur.initingFL,h.topFriends=t,h.updateCache("friends"),h.forceUpdate=!0,h.prepareRows(cur.tsStr||""),e()},onFail:function(){delete cur.initingFL}})):(h.updateCache("friends"),h.forceUpdate=!0,h.prepareRows(cur.tsStr||""),e())},getSimilarQueries:function(e){var t,n=[e=e.toLowerCase()];return(t=(0,s.parseLatin)(e))&&n.push(t),(t=(0,s.parseLatKeys)(e))&&n.push(t),(t=(0,s.parseCyr)(e))&&n.push(t),n},searchCache:function(e,t){var n=h.getList(e);if(!t)return!1;var r=this.getSimilarQueries(t);if(void 0!==this.cache[e][t])return r;var o=this.cache[e][t]={};(0,i.each)(r,((t,r)=>{var a=this.cache[e][" "+r.charAt(0).toLowerCase()];if(a){var s=new RegExp("(^|[\\s\\-\\(\\)\\.,;|:]+)"+(0,i.escapeRE)(r),"gi");(0,i.each)(a,(e=>{var t=n[e+"_"];if(!isArray(t))return!0;null!==t[0].match(s)&&(o[e]=1)}))}}));var a=0;return(0,i.each)(o,(()=>a++)),o._num=a,r},updateCache:function(e,t,n){var r=t||this.getList(e);this.cache[e]=n&&this.cache[e]||{},(0,i.each)(r,((t,n)=>{var r=n[0],o=(0,i.intval)(t),a=r.split(/[\s\-\(\)\.,;|:]+/);(0,i.each)(a,((t,n)=>{var r=" "+n.charAt(0).toLowerCase();this.cache[e][r]=this.cache[e][r]||{},this.cache[e][r][o]=1}))}))},listSearch:function(e,t,n,r){var o=[],a={};return t?(h.searchCache(e,t),a=h.cache[e]&&h.cache[e][t]||{}):(0,i.each)(h.getList(e),(function(e){var t=(0,i.intval)(e);a[t]=1})),(0,i.each)(h.getList(e),(function(e){var t=(0,i.intval)(e),s=a[t];if((!r||!r[t])&&s)return!!n--&&void o.push([t,this])})),o},row:function(e,t,n,r,o,a,s,l,u){var d=0;if(a&&(r=r.replace(a,'$1<em class="ts_clist_hl">$2</em>')),(0,i.inArray)(s,["h_friends","h_correspondents","h_chats"])&&(d=e),l||(l=""),u=(0,i.intval)(u)){var _="";1&u&&(_+="page_verified "),2&u&&(_+="page_top_author "),u=`<div class="${_}" onmouseover="pageVerifiedTip(this, {type: ${u}, oid: ${e}})"></div>`}else u="";return`\n<a href="${t}" class="ts_contact clear_fix" id="ts_contact${e}" onclick="return TopSearch.select(this, event, ${d});" onmousedown="event.cancelBubble = true;"\n      onmouseover="TopSearch.itemOver(this, 1, event);"  onmouseout="TopSearch.itemOver(this, 0, event);" hinttype="${s}">\n  <span class="ts_contact_photo ${(0,c.onlinePlatformClass)(o)}">\n    <img class="ts_contact_img" src="${n}"/>\n  </span>\n  <span class="ts_contact_name fl_l">\n    <div class="ts_contact_title_wrap${u?" is_verified":""}">\n      <span class="ts_contact_title">${r}</span>\n    </div>${u}\n    <div class="ts_contact_info">${l}</div>\n  </span>\n  <div class="ts_contact_status"></div>\n</a>`},searchLists:function(e){return e?{friends:{order:0,count:h.maxItems-1,label:(0,s.getLang)("global_friends")},groups:{order:1,count:4,label:(0,s.getLang)("global_communities")},publics:{count:2,parent:"groups"},events:{count:1,parent:"groups"},apps:{order:2,count:1,label:(0,s.getLang)("global_apps")},vk_apps:{order:2,count:1,label:(0,s.getLang)("global_apps")},chats:{order:3,count:h.maxItems-1,label:(0,s.getLang)("global_chats")},search:{order:4,count:h.maxItems-1,label:(0,s.getLang)("head_search_results")}}:{friends:{order:0,count:h.maxItems,label:(0,s.getLang)("global_friends")}}},initListsHtml:function(){h.listsHtml=[]},addToListsHtml:function(e,t,n){var r=h.searchLists(n),o=r[(r[e]||{}).parent||e]||{},i=o.order||0,a=o.label||"";h.listsHtml[i]=h.listsHtml[i]||(n&&a?[`<div class="ts_search_sep">${a}</div>`]:[]),h.listsHtml[i].push(t)},searchLinkHtml:function(e,t,n,r){return`<a href="${(0,i.clean)(e)}" class="ts_search_link${r?" ts_search_link_sep":""} clear_fix active" id="${(0,i.clean)(n)}" onclick="return TopSearch.select(this, event);" onmousedown="event.cancelBubble = true;" onmouseover="TopSearch.itemOver(this, 1, event);" onmouseout="TopSearch.itemOver(this, 0, event);" >\n        <span class="ts_contact_name fl_l">${t}</span>\n        <div class="ts_contact_status "></div>\n      </a>`},htmlRows:function(e){var t="",n=h.listsHtml.map((e=>e.join(""))).join("");if(e){var r="#"===e[0],o=`/search?c[section]=${r?"statuses":"auto"}&c[q]=${encodeURIComponent(e)}`,i=r?(0,s.getLang)("global_news_search_results"):(0,s.getLang)("global_show_all_results");t=h.searchLinkHtml(o,i,h.searchLinkId)}return t+n},prepareRows:function(e){var t=h.maxItems,n=(0,r.ge)("ts_cont_wrap");if(!n||!vk.id)return!1;if(cur.tsStr&&cur.tsStr===e&&!h.forceUpdate)return!1;delete h.forceUpdate,h.initListsHtml();var o={};if(e){var a=[];(0,i.each)(this.getSimilarQueries(e),(function(){a.push((0,i.escapeRE)(this))})),cur.lastRe=new RegExp("([ -]|^|s|&nbsp;|\b)("+a.join("|")+")","gi"),t--}(0,i.each)(h.searchLists(e),(function(n,a){if(h.cache[n]){var s=a.count,c=h.listSearch(n,e,s,o),l=[],d=0;(0,i.isEmpty)(c)||((0,i.each)(c,((e,n)=>{if(!t||d>=s)return!1;l.push(n),t--,d++})),l.length&&(0,i.each)(l,((t,a)=>{var s=a[1],c=(0,i.intval)(a[0]),l=c>0&&h.onlines()[c],d=u(s,6),_=d[0],p=d[1],f=d[2],m=d[3],v=d[4],g=d[5],y="search"===n?m:"h_"+n,E=h.row(c,f,p,_,l,r.re,y,v,g);h.addToListsHtml(n,E,e),o[c]=1})))}})),n.innerHTML=h.htmlRows(e),e||(0,l.removeSearchPositionTracker)(l.serviceTopSearch),!t&&e&&"#"!==e[0]&&(0,l.saveSearchAttemptStats)(l.serviceTopSearch,0,!0,e),t&&e&&"#"!==e[0]&&this.hintsSearch(e,cur.lastRe||!1),e&&(cur.tsStr=e)},hintsSearch:function(e,t){var n,o=(0,r.ge)("ts_input"),a=(0,r.ge)("ts_cont_wrap"),s=+new Date;ajax.post("al_search.php",{act:"get_pages_hints",q:e},{cache:1,onDone:function(c,d){if((0,i.trim)((0,r.val)(o))!==e)return!1;if(!c)return!1;var _=h.maxItems-(0,r.geByClass)("ts_contact",a).length-1,p=_,f={};(0,i.each)(c,(function(o,a){var s=(0,i.intval)(o),c=u(a,6),l=c[0],d=c[1],p=c[2],m=c[3],v=c[4],g=c[5],y=h.searchLists(e),E=m.replace("h_",""),w=(y[E]||{}).parent||E;if(void 0===y[w]&&(w="search"),f[w]=f[w]||{},f[w][o]=a,h.lists[w]=h.lists[w]||{},h.lists[w][o]=a,(0,r.ge)("ts_contact"+s))return!0;if(!_--)return!1;var b=h.row(s,p,d,l,!1,t,m,v,g);return h.addToListsHtml(w,b,e),n=!0,!0}));var m=+new Date-s;if((0,l.saveSearchAttemptStats)(l.serviceTopSearch,0,p!==_,e,0,d,m),(0,i.each)(f,((e,t)=>h.updateCache(e,t,!0))),n){var v=(0,r.geByClass1)("active",a),g=v?v.id:"";a.innerHTML=h.htmlRows(e),g&&(0,r.ge)(g)&&(0,r.addClass)((0,r.ge)(g),"active")}}})},writeBox:function(e){window.curFastChat&&curFastChat.inited&&window.FastChat?FastChat.selectPeer(e,!1,{entrypoint:"fastchat_global_search"}):e>0&&e<2e9?window.showWriteMessageBox(!1,e):nav.go("/im?sel="+e)}};const f=h},386409:(e,t,n)=>{"use strict";n.d(t,{notaBene:()=>d,updSideTopLink:()=>_,createButton:()=>p,actionsMenuItemLocked:()=>h,lockActionsMenuItem:()=>f,unlockActionsMenuItem:()=>m,linkLocked:()=>v,lockLink:()=>g,unlockLink:()=>y,lockButton:()=>E,unlockButton:()=>w,buttonLocked:()=>b,isButtonLocked:()=>C,disableButton:()=>S,sbWidth:()=>T,isChecked:()=>A,checkbox:()=>D,disable:()=>P,radioval:()=>O,radiobtn:()=>I,showProgress:()=>k,hideProgress:()=>R,disableEl:()=>M,enableEl:()=>L,initUiHelpers:()=>x});var r=n(315544),o=n(49535),i=n(695724),a=n(803834),s=n(635676),c=n(726271),l=n(786067),u=n(124041);function d(e,t,n){if(e=(0,r.ge)(e)){n||(0,r.elfocus)(e),void 0===(0,r.data)(e,"backstyle")&&(0,r.data)(e,"backstyle",e.style.backgroundColor||"");var o=(0,r.data)(e,"back")||(0,r.data)(e,"back",(0,r.getStyle)(e,"backgroundColor")),i={notice:"var(--field_error_background)",warning:"var(--field_error_background)"};(0,r.setStyle)(e,"backgroundColor",i[t]||t||i.warning),setTimeout((()=>(0,s.animate)(e,{backgroundColor:o},300,(function(){e.style.backgroundColor=(0,r.data)(e,"backstyle")}))),400)}}function _(e){if(window.scrollNode&&!c.browser.mobile&&window._tbLink){var t=(0,r.ge)("page_body");if(t){var n=(0,r.getXY)(t),o=(0,a.scrollGetY)(),i=bodyNode.scrollLeft,u=(0,r.ge)("side_bar"),d=(0,r.isVisible)(u);if(window._stlSideTop=Math.max((d?(0,r.getSize)(u)[1]:0)-o-(c.browser.mozilla?(0,r.getXY)(pageNode)[1]:0),n[1]),e||i!=__scrLeft){var _=(0,r.ge)("page_layout"),p=vk.rtl?_.offsetLeft+_.offsetWidth:0,h=vk.rtl?(window.lastWindowWidth||0)-p:_.offsetLeft;(0,r.setStyle)(_stlLeft,{width:Math.max(h-1,0)});var f=vk.rtl?n[0]+t.offsetWidth+5:h,m=vk.rtl?p-f:n[0]-5-f;(0,r.setStyle)(_stlSide,{left:f-i,width:Math.max(m,0)}),__scrLeft=i}(0,r.setStyle)(_stlSide,{top:_stlSideTop,height:Math.max((window.lastWindowHeight||0)-_stlSideTop,0)}),__adsUpdate();var v=200,g=_tbLink.loc||_stlWas||o>v,y=o>250&&cur._regBar,E=0,w=!1;if(g){1!==_stlShown&&((0,r.show)(_stlLeft,_stlSide),(0,r.addClass)(_stlLeft,"stl_active"),(0,r.addClass)(_stlSide,"stl_active"),_stlShown=1),_tbLink.loc&&cur._noUpLink&&(o=0),_stlWas&&o>500&&(_stlWas=0),o>v?(E=(o-v)/v,(_stlWasSet||_stlBack)&&(_stlWasSet=_stlBack=0,w=1,(0,r.val)(_stlText,(0,l.getLang)("global_to_top")),(0,r.removeClass)(_stlText,"down"),(0,r.removeClass)(_stlText,"back"))):(E=(v-o)/v,_stlWas?_stlWasSet||(_stlWasSet=1,w=0,(0,r.val)(_stlText,""),(0,r.addClass)(_stlText,"down"),_stlBack&&(_stlBack=0,(0,r.removeClass)(_stlText,"back"))):_tbLink.loc&&(_stlBack||(_stlBack=1,w=_tbLink.fast?1:0,(0,r.val)(_stlText,(0,l.getLang)("global_back")),(0,r.addClass)(_stlText,"back"),_stlWasSet&&(_stlWasSet=0,(0,r.removeClass)(_stlText,"down"))))),!1!==w&&(0,r.toggleClass)(_stlLeft,"over_fast",(0,r.hasClass)(_stlLeft,"over")&&w);var b={opacity:Math.min(Math.max(E,0),1)};vk.staticheader&&(b.top=-Math.min((0,r.getSize)("page_header_cont")[1],o)),(0,r.setStyle)(_stlLeft,b)}else 0!==_stlShown&&((0,r.hide)(_stlLeft,_stlSide),_stlShown=0);vk.id||(!_regBar&&y?(_regBar=1,(0,r.val)((0,r.ge)("reg_bar_content"),cur._regBar),(0,s.animate)((0,r.ge)("reg_bar"),{top:0,transition:s.Fx.Transitions.sineInOut},400),(0,s.animate)((0,r.ge)("stl_bg"),{paddingTop:60,transition:s.Fx.Transitions.sineInOut},400)):_regBar&&!y&&(_regBar=0,(0,s.animate)((0,r.ge)("reg_bar"),{top:-56,transition:s.Fx.Transitions.sineInOut},400),(0,s.animate)((0,r.ge)("stl_bg"),{paddingTop:13,transition:s.Fx.Transitions.sineInOut},400)))}}}function p(e,t){if((e=(0,r.ge)(e))&&!e.btnevents)if((0,r.hasClass)(e,"flat_button"))(0,i.isFunction)(t)&&(e.onclick=t.pbind(e));else{var n=e.parentNode;if((0,r.hasClass)(n,"button_blue")||(0,r.hasClass)(n,"button_gray"))(0,i.isFunction)(t)&&(e.onclick=t.pbind(e));else{var a=!1;(0,o.addEvent)(e,"click mousedown mouseover mouseout",(function(i){if(!(0,r.hasClass)(n,"locked"))switch(i.type){case"click":if(!a)return;return e.className="button_hover",t(e),(0,o.cancelEvent)(i);case"mousedown":e.className="button_down";break;case"mouseover":a=!0,e.className="button_hover";break;case"mouseout":e.className="button",a=!1}})),e.btnevents=!0}}}function h(e){var t=(0,r.ge)(e);if(t)return(0,r.hasClass)(t,"ui_actions_menu_item_lock")}function f(e){if((e=(0,r.ge)(e))&&!e.classList.contains("ui_actions_menu_item_lock")){if(e.classList.contains("ui_actions_menu_item_with_icon"))return e.classList.add("ui_actions_menu_item_lock"),void k(e);if((0,r.hasClass)(e,"ui_actions_menu_item")){(0,r.data)(e,"inner",e.innerHTML),(0,r.addClass)(e,"ui_actions_menu_item_lock");var t=(0,r.ce)("div",{className:"ui_actions_menu_item_lock_text"});(0,r.val)(t,e.innerHTML),e.appendChild(t),k(e)}}}function m(e){if((e=(0,r.ge)(e))&&e.classList.contains("ui_actions_menu_item_lock"))return e.classList.contains("ui_actions_menu_item_with_icon")?(e.classList.remove("ui_actions_menu_item_lock"),void R(e)):void((e=(0,r.ge)(e))&&(0,r.hasClass)(e,"ui_actions_menu_item")&&(0,r.hasClass)(e,"ui_actions_menu_item_lock")&&((0,r.removeClass)(e,"ui_actions_menu_item_lock"),e.innerHTML=(0,r.data)(e,"inner")))}function v(e){var t=(0,r.ge)(e);if(t)return(0,r.hasClass)(t,"link_lock")}function g(e,t){var n=(0,r.ge)(e);n&&"a"===n.tagName.toLowerCase()&&!v(n)&&((0,r.addClass)(n,"link_lock"),t&&(0,i.each)(t,((e,t)=>(0,r.addClass)(n,t))))}function y(e,t){var n=(0,r.ge)(e);n&&v(n)&&((0,r.removeClass)(n,"link_lock"),t&&(0,i.each)(t,((e,t)=>(0,r.removeClass)(n,t))))}function E(e){var t=(0,r.ge)(e);if(t){if(u.FlatButton.isFlatButton(t))return u.FlatButton.lock(t);if(("button"===t.tagName.toLowerCase()||(0,r.hasClass)(t,"flat_button")||(0,r.hasClass)(t,"wr_header"))&&!C(t)){var n=(0,r.getSize)(t);(0,r.addClass)(t,"flat_btn_lock"),(0,r.data)(t,"inner",t.innerHTML),(0,r.setStyle)(t,{width:n[0],height:n[1]}),t.innerHTML="",k(t,"btn_lock")}}}function w(e){var t=(0,r.ge)(e);if(t)return u.FlatButton.isFlatButton(t)?u.FlatButton.unlock(t):void(C(t)&&(R(t),t.innerHTML=(0,r.data)(t,"inner"),(0,r.removeClass)(t,"flat_btn_lock"),(0,r.setStyle)(t,{width:null,height:null})))}function b(e){return C(e)}function C(e){var t=(0,r.ge)(e);if(t)return u.FlatButton.isFlatButton(t)?u.FlatButton.isLocked(t):(0,r.hasClass)(t,"flat_btn_lock")}function S(e,t){var n=(0,r.ge)(e);if(n&&"button"===n.tagName.toLowerCase()){if(u.FlatButton.isFlatButton(n))return u.FlatButton.setDisabled(n,t);if(t){if(!(0,r.isVisible)(n))return;n.parentNode.insertBefore((0,r.ce)("button",{innerHTML:n.innerHTML,className:n.className+" button_disabled"}),n),(0,r.hide)(n)}else{var o=(0,r.domPS)(n);o&&(0,r.hasClass)(o,"button_disabled")&&(0,r.re)(o),(0,r.show)(n)}}}function T(e){if(void 0===window._sbWidth||e){var t=(0,r.ce)("div",{innerHTML:'<div style="height: 75px;">1<br>1</div>'},{overflowY:"scroll",position:"absolute",width:"50px",height:"50px"});bodyNode.appendChild(t),window._sbWidth=Math.max(0,t.offsetWidth-t.firstChild.offsetWidth-1),bodyNode.removeChild(t)}return window._sbWidth}function A(e){return(e=(0,r.ge)(e))&&(0,r.hasClass)(e,"on")?1:""}function D(e,t){var n=(0,r.ge)(e);if(n&&!(0,r.hasClass)(n,"disabled"))return void 0===t&&(t=!A(n)),(0,r.toggleClass)(n,"on",t),n.setAttribute("aria-checked",t?"true":"false"),!1}function P(e,t){return e=(0,r.ge)(e),void 0===t&&(t=!(0,r.hasClass)(e,"disabled")),(0,r.toggleClass)(e,"disabled",t),"INPUT"===e.tagName&&(t?e.setAttribute("readonly","readonly"):e.removeAttribute("readonly")),!1}function O(e){return!!radioBtns[e]&&radioBtns[e].val}function I(e,t,n){if(radioBtns[n]&&!(0,r.hasClass)(e,"disabled"))return(0,i.each)(radioBtns[n].els,(function(){this&&(this==e?((0,r.addClass)(this,"on"),this.setAttribute("aria-checked","true"),this.setAttribute("tabindex","0")):((0,r.removeClass)(this,"on"),this.setAttribute&&(this.setAttribute("aria-checked","false"),this.setAttribute("tabindex","-1"))))})),radioBtns[n].val=t}function k(e,t,n,o){var i;if(e=(0,r.ge)(e))return(0,r.hasClass)(e,"pr")?i=e:(i=(0,r.se)((0,r.rs)(vk.pr_tpl,{id:t||"",cls:n||""})),o?(0,r.domInsertBefore)(i,e):e.appendChild(i)),setTimeout((function(){(0,r.setStyle)(i,{opacity:1})})),i}function R(e){e&&((0,r.hasClass)(e,"pr")?(0,r.setStyle)(e,{opacity:0}):(0,r.re)((0,r.geByClass1)("pr",e)))}function M(e){(0,r.setStyle)(e,"pointer-events","none")}function L(e){(0,r.setStyle)(e,"pointer-events","")}function x(){window.__scrLeft=0,window.radioBtns={}}},159121:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{topMsg:()=>topMsg,topError:()=>topError,showMsg:()=>showMsg,showGlobalPrg:()=>showGlobalPrg});var core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(66108),core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(296253),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(59357),_dom__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(315544),_shared_user_user_env__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(19331),_shared_lib_js_logger__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(66433),_shared_lib_sentry_config__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(209509),_utils_common__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(695724);function topMsg(e,t,n){if(n||(n="var(--content_tint_background)"),e){clearTimeout(window.topMsgTimer);var r=(0,_dom__WEBPACK_IMPORTED_MODULE_3__.ge)("system_msg");r.style.backgroundColor=n,r.innerHTML=e,(0,_dom__WEBPACK_IMPORTED_MODULE_3__.show)(r),t&&(window.topMsgTimer=setTimeout(topMsg.pbind(!1),1e3*t))}else(0,_dom__WEBPACK_IMPORTED_MODULE_3__.hide)("system_msg")}function topError(text,opts){var prefix="VK error: ";opts||(opts={});var hasDummyStacktrace=!opts.stack;if(text.message){var error=text;text="<b>JavaScript error</b>"+((0,_shared_user_user_env__WEBPACK_IMPORTED_MODULE_4__.partConfigEnabled)("extended_client_logging")?": "+error.message:""),opts.stack=error.stack,error.stack&&__debugMode&&(text+="<br/>"+error.stack.replace(/\n/g,"<br/>"));try{console.error(prefix,error.message),console.log(error.stack)}catch(e){}}else try{console.error(prefix,text)}catch(e){}if(!opts.stack){hasDummyStacktrace=!0;try{eval("0 = 1")}catch(e){opts.stack=e.stack}}if(-1!=opts.dt&&topMsg(text,opts.dt,"#FFB4A3"),1!==opts.type&&!__dev&&!(0,_dom__WEBPACK_IMPORTED_MODULE_3__.ge)("debuglogwrap")){delete opts.dt;var breadcrumb={message:text,data:{msg:opts.msg||text,module:(window.cur||{}).module,id:vk.id,host:locHost,lang:vk.lang,loc:(window.nav||{}).strLoc,realloc:location.toString()}};(0,_shared_lib_js_logger__WEBPACK_IMPORTED_MODULE_5__.logError)(opts,{environment:_shared_lib_sentry_config__WEBPACK_IMPORTED_MODULE_6__.topErrorModuleName,breadcrumb,hasDummyStacktrace})}}function showMsg(e,t,n,r){var o="msg"+("msg"!==n?" "+n:"");r&&(o+=" msg_appear"),e=(0,_dom__WEBPACK_IMPORTED_MODULE_3__.ge)(e);var i=(0,_dom__WEBPACK_IMPORTED_MODULE_3__.geByClass1)(n,e),a=i||(0,_dom__WEBPACK_IMPORTED_MODULE_3__.domFC)(e),s=e.insertBefore((0,_dom__WEBPACK_IMPORTED_MODULE_3__.ce)("div",{className:o,innerHTML:'<div class="msg_text">'+t+"</div>"}),a);i&&(0,_dom__WEBPACK_IMPORTED_MODULE_3__.re)(i),setTimeout(_dom__WEBPACK_IMPORTED_MODULE_3__.removeClass.pbind(s,"msg_appear"),0)}function showGlobalPrg(e,t){var n=(0,_dom__WEBPACK_IMPORTED_MODULE_3__.getXY)(e),r=(0,_dom__WEBPACK_IMPORTED_MODULE_3__.getSize)(e),o=t||{},i=o.w,a=void 0===i?32:i,s=o.h,c=void 0===s?13:s,l=(0,_dom__WEBPACK_IMPORTED_MODULE_3__.ge)("global_prg");l.className=o.cls||"progress",(0,_dom__WEBPACK_IMPORTED_MODULE_3__.setStyle)(l,{left:n[0]+Math.floor((r[0]-a)/2)+(0,_utils_common__WEBPACK_IMPORTED_MODULE_7__.intval)(o.shift?o.shift[0]:0),top:n[1]+Math.floor((r[1]-c)/2)+(0,_utils_common__WEBPACK_IMPORTED_MODULE_7__.intval)(o.shift?o.shift[1]:0),width:a,height:c,display:"block","z-index":o.zIndex?o.zIndex:null}),o.hide&&(e.style.visibility="hidden")}},982452:(e,t,n)=>{"use strict";n.d(t,{unpackStore:()=>h.unpackStore,parseJSON:()=>f.parseJSON,throttleAccumulate:()=>m,lplog:()=>v,toArray:()=>g,arrayUnique:()=>y,throttle:()=>E,shuffle:()=>w,parallel:()=>b,hashCode:()=>C,checkTextLength:()=>S,getSelectionText:()=>T,goAway:()=>A,isFullScreen:()=>D,updateMoney:()=>P,toggleOnline:()=>O,onlinePlatformClass:()=>I,handleScroll:()=>k,showErrorBox:()=>R,getDropdownValue:()=>M});n(751876),n(21466),n(66108),n(991181),n(296253);var r=n(961540),o=n(695724),i=n(376567),a=n(40906),s=n(654612),c=n(315544),l=n(786067),u=n(726271),d=n(376270),_=n(49535),p=n(803834),h=n(712439),f=n(520820);function m(e,t){var n=[],r=0;return function(o){n.push(o),r||(r=setTimeout((()=>{r=!1,e(n),n=[]}),t))}}function v(e,t){var n,r;if(window.__debugMode){switch(t){case"error":n="color: red",r="background: red; color: white";break;case"success":n="color: green",r="background: green; color: white";break;default:n="color: blue;",r="background: #000; color: #fff;"}try{var o=new Date;console.debug(`%cLP:[${o.getHours()}:${o.getMinutes()}:${o.getSeconds()}:${o.getMilliseconds()}]%c ${e}`,r,n)}catch(e){}}}function g(e){var t=[];if(void 0===e.length)return Object.keys(e).map((t=>e[t]));for(var n=0;n<e.length;n++)t.push(e[n]);return t}function y(e){for(var t={},n=[],r=0;r<e.length;r++)t[e[r]]||(n.push(e[r]),t[n[r]]=1);return n}function E(e,t){var n;return function(){n||(e.apply(this,arguments),n=setTimeout((function(){n=!1}),t))}}function w(e){for(var t=e.length;t>0;){var n=Math.floor(Math.random()*t),r=e[--t];e[t]=e[n],e[n]=r}return e}function b(){var e=[].slice.call(arguments),t=e.pop(),n=new CallHub(t,e.length);(0,o.each)(e,((e,t)=>t((()=>n.done()))))}function C(e){var t=0;if(0===e.length)return t;for(var n=0,r=e.length;n<r;n++){t=(t<<5)-t+e.charCodeAt(n),t|=0}return t}function S(e,t,n,r,o,i,a){var s=t.getValue?t.getValue():t.value,u=t.lastLen||0;if(t.lastLen!==s.length||i){t.lastLen=s.length;var d={"&":5,"<":4,">":4,'"':6,"\n":r?1:4,"\r":0,"!":5,"'":5,$:6,"\\":6},_={1168:1,1169:1,8211:1,8212:1,8216:1,8217:1,8218:1,8230:1,8240:1,8249:1,8250:1,8364:1,8470:1,8482:1,65533:1},p={1037:1,1104:1,1117:1};o&&(d[","]=5);var h=function(e){for(var t=0,n=0,r=e.length;n<r;n++){var o=d[e.charAt(n)],i=e.charCodeAt(n);t+=void 0!==o?o:!a&&i>=128&&(i<1025||p[i]||i>1119)&&!_[i]&&(i<8220||i>8222)&&(i<8224||i>8226)?("&#"+i+";").length:1}return t}(s);if(n=(0,c.ge)(n),h>Math.max(e-100,.75*e))if((0,c.show)(n),h>e)if(o){var f=(0,c.val)(t,function(e,t){for(var n=0,r="",o=0,i=e.length;o<i;o++){var s=e.charAt(o),c=d[s],l=e.charCodeAt(o);if((n+=void 0!==c?c:!a&&l>=128&&(l<1025||p[l]||l>1119)&&!_[l]&&(l<8220||l>8222)&&(l<8224||l>8226)?("&#"+l+";").length:1)>t)break;r+=s}return r}(s,Math.min(e,u)));t.lastLen=f.length,n.innerHTML=(0,l.getLang)("text_N_symbols_remain",0)}else n.innerHTML=(0,l.getLang)("text_exceeds_symbol_limit",h-e);else n.innerHTML=(0,l.getLang)("text_N_symbols_remain",e-h);else(0,c.hide)(n)}}function T(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e}function A(e,t,n){if(-1!==(t||{}).h||(0,_.checkEvent)(n))return!0;if(-1!==(t||{}).h){var c=e.match(r.VK_URL_REGEX_STRICT);if(c&&"api."!==c[1].toLowerCase())return location.href=e,!1;var l=(0,o.intval)((0,i.getCookie)("remixsettings_bits"));if(r.VK_URL_REGEX_STRICT.test((0,a.locBase)())||1&l)return window.open("/away.php?to="+encodeURIComponent(e)+(t&&void 0!==t.h?"&h="+t.h:""),"_blank"),!1}var u=(0,o.extend)({act:"a_go",to:e},t||{});return!(0,s.showBox)("away.php",u,{},n)}function D(){return!!(document.fullscreenElement||document.fullScreenElement||document.msFullscreenElement||document.mozFullScreen||document.webkitIsFullScreen||cur.pvPartScreen)}function P(e,t){if(void 0!==e&&!1!==e){var n="";!0===t?(vk.balanceEx=e,n="_ex"):vk.balance=e;var r=(0,c.geByClass)("votes_balance_nom"+n);(0,o.each)(r,((t,n)=>n.innerHTML=`${e} ${(0,l.getLang)("votes_flex",e)}`));var i=e*(vk.vcost||7),a=(0,c.geByClass)("money_balance_nom"+n);(0,o.each)(a,((e,t)=>t.innerHTML=(0,l.getLang)("global_money_amount_rub",i,!0))),void 0!==t&&!1!==t&&!0!==t&&P(t,!0),window.GamesCatalog&&window.GamesCatalog.updateMoney(e)}}function O(e,t){var n=I(t).split(" "),r=[];["online","mobile","_online"].forEach((function(t){(0,o.inArray)(t,n)&&!(0,c.hasClass)(e,t)?r.push(t):!(0,o.inArray)(t,n)&&(0,c.hasClass)(e,t)&&(0,c.removeClass)(e,t)})),r.length>0&&(0,c.addClass)(e,r.join(" "))}function I(e){var t=" _online";return e&&(t+=" online"),u.mobPlatforms[e]&&(t+=" mobile"),(0,d.updateOnlineText)(),t}function k(e){e=e.split(",");var t=cur.named||{},n=e[0]&&(t[e[0]]||(0,c.ge)(e[0]))||!1,r=e[1]&&(t[e[1]]||(0,c.ge)(e[1]))||!1;if(!n&&!r){if(!(n=document.getElementsByName(e[0])[0]))return;n=n.nextSibling}var o=(0,c.ge)("page_header_wrap")||(0,c.ge)("dev_top_nav_wrap");setTimeout((function(){n&&(0,p.scrollToY)((0,c.getXY)(n)[1]-(o?(0,c.getSize)(o)[1]:0),0),r&&(0,c.elfocus)(r)}),300)}function R(e,t){return void 0===t&&(t=1e4),setTimeout((0,s.showFastBox)({title:(0,l.getLang)("global_error")},e).hide,t)}function M(e){var t=(0,c.ge)(e+"_container");if(t||(t=(0,c.ge)(e)),t&&t.dropdown)return t.dropdown.val()}},695724:(e,t,n)=>{"use strict";n.d(t,{rand:()=>a.rand,replaceEntities:()=>a.replaceEntities,isArray:()=>a.isArray,isEmpty:()=>a.isEmpty,isFunction:()=>a.isFunction,isObject:()=>a.isObject,isString:()=>a.isString,isUndefined:()=>a.isUndefined,irand:()=>a.irand,escapeRE:()=>a.escapeRE,each:()=>a.each,vkNow:()=>a.vkNow,stripTags:()=>a.stripTags,vkLocal:()=>c,lTimeout:()=>l,vkImage:()=>u,trim:()=>d,stripHTML:()=>_,intval:()=>p,floatval:()=>h,positive:()=>f,isNumeric:()=>m,isNumber:()=>v,winToUtf:()=>g,clean:()=>y,unclean:()=>E,indexOf:()=>w,inArray:()=>b,clone:()=>C,arrayKeyDiff:()=>S,extend:()=>T,addTemplates:()=>A,getTemplate:()=>D,serializeForm:()=>P,extractUrls:()=>O,isRetina:()=>I,getCaretCharacterOffsetWithin:()=>k,formatCount:()=>R,encodeHtml:()=>U,decodeHtml:()=>F,initUtilsCommon:()=>W});n(530522),n(991181),n(579665),n(95767),n(66108),n(296253),n(21466),n(59357);var r=n(315544),o=n(786067),i=n(726271),a=n(40906);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t=PageID;return function(){t===PageID&&e.apply(this,arguments)}}function l(e,t){return setTimeout(c(e),t)}var u=()=>window.Image?new Image:(0,r.ce)("img"),d=e=>(e||"").replace(/^\s+|\s+$/g,""),_=e=>e?e.replace(/<(?:.|\n|\r|\u2028|\u2029)*?>/g,""):"";function p(e){return!0===e?1:parseInt(e)||0}function h(e){return!0===e?1:parseFloat(e)||0}function f(e){return(e=p(e))<0?0:e}function m(e){return!isNaN(e)}function v(e){return"number"==typeof e&&(e===Number(e)&&(e!==1/0&&e!==-1/0))}function g(e){return e.replace(/&#(\d\d+);/g,(function(e,t){return(t=p(t))>=32?String.fromCharCode(t):e})).replace(/&quot;/gi,'"').replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&amp;/gi,"&")}function y(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""}function E(e){return(0,a.replaceEntities)(e.replace(/\t/g,"\n"))}function w(e,t,n){for(var r=n||0,o=(e||[]).length;r<o;r++)if(e[r]==t)return r;return-1}function b(e,t){return-1!==w(t,e)}function C(e,t){var n=(0,a.isObject)(e)||void 0===e.length?{}:[];for(var r in e)(!/webkit/i.test(_ua)||"layerX"!=r&&"layerY"!=r&&"webkitMovementX"!=r&&"webkitMovementY"!=r)&&(t&&"object"==typeof e[r]&&"prototype"!==r&&null!==e[r]?n[r]=C(e[r]):n[r]=e[r]);return n}function S(e){var t={},n=arguments.length,r=arguments;for(var o in e)if(e.hasOwnProperty(o)){for(var i=!1,a=1;a<n;a++)r[a][o]&&r[a][o]===e[o]&&(i=!0);i||(t[o]=e[o])}return t}function T(){var e=arguments,t=e.length,n=e[0]||{},r=1,o=!1;for("boolean"==typeof n&&(o=n,n=e[1]||{},r=2),"object"==typeof n||(0,a.isFunction)(n)||(n={});r<t;r++){var i=e[r];if(null!=i)for(var s in i)if(i.hasOwnProperty(s)){var c=n[s],l=i[s];n!==l&&(o&&l&&"object"==typeof l&&!l.nodeType?n[s]=T(o,c||(null!=l.length?[]:{}),l):void 0!==l&&(n[s]=l))}}return n}function A(e){window.templates=window.templates||{},T(window.templates,e)}function D(e,t){var n=(window.templates=window.templates||{})[e];return"function"==typeof n&&(n=n()),n&&t?(0,r.rs)(n,t):n||""}function P(e){if("object"!=typeof e)return!1;var t={},n=t=>(0,r.geByTag)(t,e),o=function(n,o){if(o.name)if("text"!==o.type&&o.type)if(o.getAttribute("bool")){var a=(0,r.val)(o);if(!a||"0"===a)return;t[o.name]=1}else t[o.name]=i.browser.msie&&!o.value&&e[o.name]?e[o.name].value:o.value;else t[o.name]=(0,r.val)(o)};return(0,a.each)(n("input"),(function(e,t){if("radio"!==t.type&&"checkbox"!==t.type||t.checked)return o(0,t)})),(0,a.each)(n("select"),o),(0,a.each)(n("textarea"),o),t}function O(e,t){for(var n,r=t?/(?:([!()?., \n\r\t \u00A0]|^)((https?:\/\/)?((?:[a-z0-9_\-]+\.)+(?:[a-z]{2,10}|xn--p1ai|xn--j1amh|xn--80asehdb|xn--80aswg))(\/.*?)?(\#.*?)?)(?:[\.!:;,\*\(\)&]*(&nbsp;|[ \t\r\n \u00A0]|$))|([!()?., \n\r\t \u00A0]|^)((https?:\/\/)?((?:[a-z0-9а-яєґї_\-]+\.)+(?:рф|укр|онлайн|сайт|срб))(\/.*?)?(\#.*?)?)(?:[\.!:;,\*\(\)&]*(&nbsp;|[ \t\r\n \u00A0]|$)))/i:/(?:([!()?., \n\r\t \u00A0]|^)((https?:\/\/)?((?:[a-z0-9_\-]+\.)+(?:[a-z]{2,10}|xn--p1ai|xn--j1amh|xn--80asehdb|xn--80aswg))(\/.*?)?(\#.*?)?)(?:[\.!:;,\*\(\)]*(&nbsp;|[ \t\r\n \u00A0]))|([!()?., \n\r\t \u00A0]|^)((https?:\/\/)?((?:[a-z0-9а-яєґї_\-]+\.)+(?:рф|укр|онлайн|сайт|срб))(\/.*?)?(\#.*?)?)(?:[\.!:;,\*\(\)]*(&nbsp;|[ \t\r\n \u00A0])))/i,o=[];e&&(n=e.match(r));){e=e.substr(n.index+n[0].length);var i=0;n[4]||(i=7),o.push({url:n[2+i],query:n[5+i]||"",domain:n[4+i]})}return o}var I=()=>window.devicePixelRatio>=2;function k(e){if(!e)return[0,0];var t=0,n=0,r=e.ownerDocument||e.document,o=r.defaultView||r.parentWindow;if(o.getSelection().rangeCount>0){var i=o.getSelection().getRangeAt(0),a=i.cloneRange();a.selectNodeContents(e),a.setEnd(i.startContainer,i.startOffset),t=a.toString().length,a.setEnd(i.endContainer,i.endOffset),n=a.toString().length}return[t,n]}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.kLimit||1e3,r=t.mLimit||1e6;return e>=r&&!t.noCheck?R(e=(e=p(e/1e5))>1e3?p(e/10):e/10,T(t,{noCheck:!0}),!0)+"M":e>=n&&!t.noCheck?R(e=(e=p(e/100))>100?p(e/10):e/10,T(t,{noCheck:!0}),!0)+"K":(0,o.langNumeric)(e,"%s",!0).replace(/,/g,".")}var M,L,x,N=(x=null,[function(e){return x||(x=(0,r.se)("<span> </span>")),x.innerText=e,x.innerHTML},function(e){return x||(x=(0,r.se)("<span> </span>")),x.innerHTML=e.replace(/<br\s*\/?>/gim,"\n"),x.innerText}]),B=(L=2,function(e){if(Array.isArray(e))return e}(M=N)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(M,L)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(M,L)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),U=B[0],F=B[1];function W(){window.PageID=window.PageID||1}},985048:(e,t,n)=>{"use strict";n.d(t,{isPhoneNumber:()=>i,isEmail:()=>a});n(21466);var r=/^\+?[\d]{4,18}$/,o=/^\S+@\S+\.\S+$/;function i(e){return e=trim(e),Boolean(e.match(r))}var a=e=>(e=trim(e),Boolean(e.match(o)))},325489:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{showVideo:()=>showVideo,showInlineVideo:()=>showInlineVideo,loadInlineVideo:()=>loadInlineVideo,revertLastInlineVideo:()=>revertLastInlineVideo,pauseLastInlineVideo:()=>pauseLastInlineVideo,playLastInlineVideo:()=>playLastInlineVideo,checkMp4:()=>checkMp4,VideoConstants:()=>VideoConstants,initVideo:()=>initVideo});var core_js_modules_es6_object_assign__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(175115),core_js_modules_es6_regexp_split__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(751876),_videoplayer_lib_player_states__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(141454),_dom_events__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(49535),_utils_common__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(695724),_dom__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(315544),_lang__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(786067),_message_box__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(654612),_layout_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(635429),_web_unauthorized_unauthorized__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(273271),_web_video_video_utils__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(108046),_shared_lib_site__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(961540);function _extends(){return _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(this,arguments)}var rtrgQuery=`//${(0,_shared_lib_site__WEBPACK_IMPORTED_MODULE_9__.getHostName)()}/rtrg?r=w*Z1Flwi3QdbWaoLMc7zOA*7Cr4Nrtojr9otHjsjIhsb2CVqRWalgbvxZw3MzxZa6be3Siu2XY3gvK5fysYtWLWgNwHMpjRTupSGZrcGRNlj7fduqq9*t7ij6CX4aMcBTD5be8mIXJsbTsvP8Zl2RZEd76a4FTuCOFqzMxqGtFc-`;function showVideo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(cur.viewAsBox)return cur.viewAsBox();if(!(0,_dom_events__WEBPACK_IMPORTED_MODULE_2__.checkEvent)(r)){if((0,_web_unauthorized_unauthorized__WEBPACK_IMPORTED_MODULE_8__.isUnauthorizedMediaLayerBoxAvailable)()&&(r||n.openInPopup)&&!n.forceUnauth&&!cur.is_showcase)return _web_unauthorized_unauthorized__WEBPACK_IMPORTED_MODULE_8__.Unauthorized.showMoreBox(null,0,_web_unauthorized_unauthorized__WEBPACK_IMPORTED_MODULE_8__.UnauthorizedSourceType.VIDEO,(()=>{showVideo(e,t,_extends({},n,{openInPopup:!1,forceUnauth:!0}),r)})),!1;if(n.forceUnauth=!0,window.mvcur&&mvcur.mvShown&&mvcur.minimized&&mvcur.videoRaw==e)return Videoview.unminimize(),!1;var o=nav.objLoc.claim,i=!(!n.addParams||!/^-?\d+_\d+$/.test(n.addParams.post_id))&&n.addParams.post_id;if(!n.playlistId&&i&&(/^public|groups|profile$/.test(cur.module)&&(0,_dom__WEBPACK_IMPORTED_MODULE_4__.hasClass)("post"+i,"own")?n.playlistId="wall_"+cur.oid:n.playlistId="post_"+n.addParams.post_id),n.playlistId)if(n.addParams=(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.extend)(n.addParams,{playlist_id:n.playlistId}),window.VideoPlaylist&&VideoPlaylist.getList(n.playlistId))e||(n.addParams.load_playlist=1);else if(/^wall_/.test(n.playlistId)){var a=cur.wallVideos&&cur.wallVideos[n.playlistId];n.addParams.load_playlist=a&&a.list.length>=50?0:1}else n.addParams.load_playlist=!/^(?:post_)?-?\d+_-?\d+$/.test(n.playlistId)||cur.pageVideosList&&cur.pageVideosList[n.playlistId]?0:1;!n.expandPlayer&&cur.videoInlinePlayer&&cur.videoInlinePlayer.getVideoId()==e&&cur.videoInlinePlayer.canExpand()&&(n.expandPlayer=cur.videoInlinePlayer),n.expandPlayer&&(n.addParams=(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.extend)(n.addParams,{expand_player:1}),delete cur.videoInlinePlayer);var s=new CallHub((function(){n.hidden?n.hidden(s.data,n,t,e):Videoview.showVideo.apply(Videoview,s.data)}),2);stManager.add(["videoview.js","videoview.css","page.js","page.css"],(()=>{s.failed||(n.hidden||(revertLastInlineVideo(),Videoview.show(r,e,t,n)),s.done())})),(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.extend)(n,{onDone:function(){var t=Array.prototype.slice.call(arguments);t.unshift(e),s.data=t,s.done()},onFail:function(t){if(s.failed=1,!n.hidden){if(window.mvcur&&mvcur.mvShown)Videoview.hide();else{var r=(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.clone)(nav.objLoc);r.z==="video"+e&&delete r.z,r[0]==="video"+e&&(r[0]="videos"+e.split("_")[0]),nav.setLoc(r)}(0,_message_box__WEBPACK_IMPORTED_MODULE_6__.showFastBox)((0,_lang__WEBPACK_IMPORTED_MODULE_5__.getLang)("global_error"),t||(0,_lang__WEBPACK_IMPORTED_MODULE_5__.getLang)("global_error_occured")),s.done()}return!0},cache:"status"!==t});var c=n.params;return c||(c={act:"show",video:e,list:t,autoplay:n.autoplay?1:0,ad_video:n.ad_video,module:n.module||window.Videoview&&window.Videoview.getVideoModule()||"",svids:n.svids}),cur.is_showcase&&!c.context&&cur.ref_context&&(c.context=cur.ref_context),n.addParams&&(c=(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.extend)(c,n.addParams)),(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.trim)(c.module)||(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.extend)(c,{_nol:JSON.stringify(nav.objLoc)}),o&&(c.claim=o),ajax.post(`al_video.php?act=${c.act}`,c,n),(0,_web_video_video_utils__WEBPACK_IMPORTED_MODULE_10__.idlizeCall)((()=>{(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.vkImage)().src=`${locProtocol}${rtrgQuery}`})),!1}}function showInlineVideo(videoId,listId,options,ev,thumb){if((0,_dom_events__WEBPACK_IMPORTED_MODULE_2__.checkEvent)(ev))return!0;if(options=options||{},window.mvcur&&mvcur.mvShown||options.hasRestriction)return showVideo(videoId,listId,options,ev);var requestedAt=Date.now();if((0,_dom__WEBPACK_IMPORTED_MODULE_4__.attr)(thumb,"data-loading"))return!1;var h=thumb.clientHeight,w=thumb.clientWidth,btn=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.domByClass)(thumb,"page_post_video_play_inline"),onLoaded=options.onLoaded;onLoaded&&delete options.onLoaded;var params={video:videoId,list:listId,autoplay:options.autoplay,module:options.module};return(0,_dom__WEBPACK_IMPORTED_MODULE_4__.domData)(thumb,"stretch-vertical")&&(params.stretch_vertical=1),(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.extend)(params,options.addParams),showProgress(),loadInlineVideo(params,(function(e,t){hideProgress(),e?onDone.apply(null,t):onFail.apply(null,t)}),options.cache),cur.videoInlinePlayerDestroyerSet||(cur.destroy.push(_destroyInlineVideoPlayer),cur.videoInlinePlayerDestroyerSet=1),(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.vkImage)().src=rtrgQuery,!1;function onDone(title,html,js,opts){revertLastInlineVideo(),(0,_dom__WEBPACK_IMPORTED_MODULE_4__.hide)(thumb);var videoWrap=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.ce)("div",{innerHTML:html,className:"inline_video_wrap"},{width:w,height:h});if(-195297477!==opts.mvData.authorId&&(window._videoLastInlined=[videoWrap,thumb]),thumb.parentNode.appendChild(videoWrap),cur.mvOpts=!(!opts||!opts.mvData)&&opts.mvData,opts.player){var container=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.domByClass)(videoWrap,"video_box_wrap");(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.isFunction)(onLoaded)&&(opts.player.params[0].onPlayerLoaded=onLoaded);var linkAttr=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.attr)(thumb,"data-link-attr");linkAttr&&(opts.player.params[0].link_attr=linkAttr),VideoInitializer.initPlayer(container,opts.player.type,opts.player.params,{requestedAt})}try{eval("(function () {"+js+"})();")}catch(e){}if(!params.from_autoplay){var notifier=window.Notifier;notifier&&setTimeout((()=>notifier.lcSend("video_start")),0);var audioPlayer=window.ap;audioPlayer&&audioPlayer.isPlaying()&&(audioPlayer.pause(),audioPlayer.pausedByVideo=(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.vkNow)())}ev&&domClosest("bookmarks_row_type_video",ev.target)&&statlogsValueEvent("bookmarks_product_analytics",{item_type:"video",item_owner_id:cur.mvOpts.oid,item_id:cur.mvOpts.vid,time:window.getServerTime()}),thumb.setAttribute("data-playing",1)}function onFail(e){params.from_autoplay||(0,_message_box__WEBPACK_IMPORTED_MODULE_6__.showFastBox)((0,_lang__WEBPACK_IMPORTED_MODULE_5__.getLang)("global_error"),e||(0,_lang__WEBPACK_IMPORTED_MODULE_5__.getLang)("global_error_occured"))}function showProgress(){thumb.setAttribute("data-loading",1),options.no_progress||((0,_dom__WEBPACK_IMPORTED_MODULE_4__.addClass)(btn,"page_post_video_play_inline_loading"),(0,_dom__WEBPACK_IMPORTED_MODULE_4__.val)(btn,(0,_layout_utils__WEBPACK_IMPORTED_MODULE_7__.getProgressHtml)()))}function hideProgress(){thumb.removeAttribute("data-loading"),options.no_progress||((0,_dom__WEBPACK_IMPORTED_MODULE_4__.removeClass)(btn,"page_post_video_play_inline_loading"),(0,_dom__WEBPACK_IMPORTED_MODULE_4__.val)(btn,""))}}function loadInlineVideo(e,t,n){var r=(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.extend)({autoplay:0,module:cur.module},e);(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.trim)(r.module)||(r._nol=JSON.stringify(nav.objLoc));var o=["videoview.js","videoview.css"];function i(e,n){(0,_utils_common__WEBPACK_IMPORTED_MODULE_3__.isFunction)(t)&&t(e,n)}r.from_autoplay&&o.push("videoplayer.css"),ajax.post("al_video.php?act=show_inline",r,{onDone:function(){var e=[].slice.call(arguments);i(!0,e)},onFail:function(){var e=[].slice.call(arguments);return i(!1,e),!0},stat:o,local:1,cache:n})}function revertLastInlineVideo(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(window._videoLastInlined){var n,r=!1,o=(0,_dom__WEBPACK_IMPORTED_MODULE_4__.ge)(e);if(o&&(n=window._videoLastInlined[0])){for(;n=n.parentNode;)if(n==o){r=!0;break}if(!r)return}(0,_dom__WEBPACK_IMPORTED_MODULE_4__.re)(window._videoLastInlined[0]),(0,_dom__WEBPACK_IMPORTED_MODULE_4__.show)(window._videoLastInlined[1]),window._videoLastInlined[1].removeAttribute("data-playing"),window._videoLastInlined=!1,_destroyInlineVideoPlayer(t),delete cur.mvOpts}}function _destroyInlineVideoPlayer(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];cur.videoInlinePlayer&&(cur.videoInlinePlayer.destroy(e),delete cur.videoInlinePlayer)}function pauseLastInlineVideo(){if(window._videoLastInlined){var e=cur.videoInlinePlayer||(0,_dom__WEBPACK_IMPORTED_MODULE_4__.ge)("video_yt")&&window.VideoYoutube;if(e){if(e.isActiveLive&&e.isActiveLive())return;cur.mvOpts.lastPlayerState=e.getState(),e.togglePlay(!1)}}}function playLastInlineVideo(){if(window._videoLastInlined&&cur.mvOpts&&cur.mvOpts.lastPlayerState===_videoplayer_lib_player_states__WEBPACK_IMPORTED_MODULE_11__.PLAYING){var e=cur.videoInlinePlayer||(0,_dom__WEBPACK_IMPORTED_MODULE_4__.ge)("video_yt")&&window.VideoYoutube;e&&e.togglePlay(!0)}}function checkMp4(e){e(!0)}var VideoConstants={VIDEO_ITEM_INDEX_OWNER_ID:0,VIDEO_ITEM_INDEX_ID:1,VIDEO_ITEM_INDEX_THUMB:2,VIDEO_ITEM_INDEX_TITLE:3,VIDEO_ITEM_INDEX_FLAGS:4,VIDEO_ITEM_INDEX_DURATION:5,VIDEO_ITEM_INDEX_HASH:6,VIDEO_ITEM_INDEX_MODER_ACTS:7,VIDEO_ITEM_INDEX_OWNER:8,VIDEO_ITEM_INDEX_DATE:9,VIDEO_ITEM_INDEX_VIEWS:10,VIDEO_ITEM_INDEX_PLATFORM:11,VIDEO_ITEM_INDEX_BLOCKED:12,VIDEO_ITEM_INDEX_MUSIC_VIDEO_META:13,VIDEO_ITEM_INDEX_ARIA:14,VIDEO_ITEM_INDEX_RESTRICTION_BLOCK:15,VIDEO_ITEM_INDEX_RESTRICTION_CLASSES:16,VIDEO_ITEM_INDEX_ADMIN_INFO:17,VIDEO_ITEM_INDEX_CARD_MENU_TOGGLE:18,VIDEO_ITEM_INDEX_RAW_DURATION:19,VIDEO_ITEM_INDEX_LINK:20,VIDEO_ITEM_INDEX_TRAILER:21,VIDEO_ITEM_INDEX_VIEWED_DURATION:22,VIDEO_ITEM_INDEX_VIEWED_DAY:23,VIDEO_ITEM_INDEX_LIST_ID:24,VIDEO_ITEM_INDEX_PLAYLIST_ID:25,VIDEO_ITEM_INDEX_CARD_ACTIONS:26,VIDEO_ITEM_INDEX_CARD_PRIVACY_ICONS:27,VIDEO_ITEM_INDEX_DESCRIPTION:28,VIDEO_ITEM_INDEX_OWNER_PHOTO:29,VIDEO_ITEM_INDEX_SMALL_THUMB:30,VIDEO_ITEM_INDEX_ML_THUMB_ID:31,VIDEO_ITEM_FLAG_EXTERNAL:1,VIDEO_ITEM_FLAG_ACTIVE_LIVE:2,VIDEO_ITEM_FLAG_CAN_EDIT:64,VIDEO_ITEM_FLAG_CAN_DELETE:128,VIDEO_ITEM_FLAG_CAN_ADD:256,VIDEO_ITEM_FLAG_PRIVATE:512,VIDEO_ITEM_FLAG_NO_AUTOPLAY:1024,VIDEO_ITEM_FLAG_ADDED:2048,VIDEO_ITEM_FLAG_SKIP_THUMB_LOAD:4096,VIDEO_ITEM_FLAG_NEED_SIGN_IN:8192,VIDEO_ITEM_FLAG_HD:16384,VIDEO_ITEM_FLAG_DELETED:32768,VIDEO_ITEM_FLAG_CAN_MOVE:65536,VIDEO_ITEM_FLAG_CAN_DELETE_FROM_HISTORY:1<<17,VIDEO_ITEM_FLAG_PRIVATE_BY_LINK:1<<18,VIDEO_ITEM_FLAG_LIVE:1<<19,VIDEO_ITEM_FLAG_PRIVATE_NOT_PUBLISHED:1<<20,VIDEO_ITEM_FLAG_PRIVATE_MEMBERS:1<<21};function initVideo(){window._videoLastInlined=!1}},499284:(e,t,n)=>{"use strict";n.d(t,{default:()=>m});n(283946),n(21466),n(59357),n(175115);var r=n(667294),o=(n(45697),n(386409)),i=n(41650),a=n(481117),s=n(118690),c=n(889366),l=n(336680),u=n(626555),d=n(378486),_=n(439664),p=n(703797),h=n(733024),f=n(982452);class m extends r.Component{constructor(e){var t;super(e),t=this,this.componentDidMount=()=>{document.addEventListener("keydown",this.onDocumentKeyDown),this.setInitialState(),this.synchronizeStateWithBackend()},this.componentWillUnmount=()=>{document.removeEventListener("keydown",this.onDocumentKeyDown),this.removeResendCodeButtonTimer()},this.componentDidUpdate=(e,t)=>{this.state.initialLoading||this.state.delayedUnblockExplanation||this.state.delayedUnblockFinished||t.phone===this.state.phone&&t.code===this.state.code&&t.codeSent===this.state.codeSent||this.updateFocus()},this.sendCode=()=>{if(!this.isBusy()){this.resetMessage();var e={act:m.acts.sendCode,phone:this.getPhonePrefix()+this.state.newPhone,hash:this.state.processHash,sure:1};ajax.post(m.controller,e,{onDone:e=>{this.setStateByProcess(e),this.setResendCodeButtonTimer()},onFail:e=>(this.setErrorMessage(e),!0),showProgress:()=>this.setState({mainButtonLoading:!0}),hideProgress:()=>this.setState({mainButtonLoading:!1})})}},this.sendCodeToBoundPhone=()=>{if(!this.isBusy()){this.resetMessage();var e={act:m.acts.sendCodeToBoundPhone,hash:this.state.processHash};ajax.post(m.controller,e,{onDone:e=>{this.setStateByProcess(e),this.setResendCodeButtonTimer()},onFail:e=>(this.setErrorMessage(e),this.synchronizeStateWithBackend(),!0),showProgress:()=>this.setState({mainButtonLoading:!0}),hideProgress:()=>this.setState({mainButtonLoading:!1})})}},this.resetPhone=e=>{this.isBusy()||(this.removeResendCodeButtonTimer(),e&&this.resetMessage(),this.setState({phonePrefixIndex:m.constants.firstCountryIndex,backendCallResetsEnabled:null,phone:"",code:"",newPhone:"",newCode:"",phonePrefixInputNeeded:!0,codeSent:!1,checkCodeAttemptsAmount:void 0}))},this.resetUnblockForm=()=>{if(!this.isBusy()){var e={act:m.acts.resetUnblockForm,hash:this.state.processHash};ajax.post(m.controller,e,{onDone:e=>{this.setStateByProcess(e,{delayedUnblockExplanation:"",delayedUnblockFinished:!1})},onFail:e=>(this.setErrorMessage(e),this.synchronizeStateWithBackend(),!0),showProgress:()=>this.setState({resetUnblockDataButtonLoading:!0}),hideProgress:()=>this.setState({resetUnblockDataButtonLoading:!1})})}},this.checkCode=()=>{if(!this.isBusy())if(this.state.newCode.length<4)(0,o.notaBene)(this.references.validationCodeInput.element);else{this.resetMessage();var e={act:m.acts.checkCode,code:this.state.newCode,hash:this.state.processHash};ajax.post(m.controller,e,{onDone:e=>{this.setStateByProcess(e),this.references.passwordInput.element.focus(),this.setState({mainButtonLoading:!1})},onFail:e=>(this.synchronizeStateWithBackend((()=>{this.setErrorMessage(e),this.setState({mainButtonLoading:!1})})),!0),showProgress:()=>this.setState({mainButtonLoading:!0})})}},this.resendCode=()=>{if(!this.isBusy()){this.resetMessage();var e={act:m.acts.resendCode,hash:this.state.processHash};ajax.post(m.controller,e,{onDone:e=>{this.setStateByProcess(e,{newCode:""}),this.setInfoMessage(this.getResentInfoMessageText()),this.setResendCodeButtonTimer(),this.references.validationCodeInput.element.focus()},onFail:e=>(this.setErrorMessage(e),this.synchronizeStateWithBackend(),!0),showProgress:()=>this.setState({noCodeButtonLoading:!0}),hideProgress:()=>this.setState({noCodeButtonLoading:!1})})}},this.unblock=()=>{if(!this.isBusy())if(m.isBadPassword(this.state.newPassword))(0,o.notaBene)(this.references.passwordInput.element);else{this.resetMessage();var e={act:m.acts.unblock,pass:this.state.newPassword,hash:this.state.unblockHash};ajax.post(m.controller,e,{onDone:e=>{e.delayed_unblock_explanation?this.setState({delayedUnblockExplanation:e.delayed_unblock_explanation,mainButtonLoading:!1}):(this.setState({password:this.state.newPassword}),m.refreshAuthDataAndRedirectToFeed(e.lg_domain_h,e.logout_hash,e.email,this.state.newPassword))},onFail:e=>(this.setErrorMessage(e),this.setState({mainButtonLoading:!1}),this.synchronizeStateWithBackend(),!0),showProgress:()=>this.setState({mainButtonLoading:!0})})}},this.redirectToAuth=()=>{this.setState({redirectToAuthButtonLoading:!0}),window.location.href=document.getElementById("top_logout_link").href},this.synchronizeStateWithBackend=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m.constants.statusSyncRetriesCount,r={act:m.acts.getStatus};ajax.post(m.controller,r,{onDone:n=>{e(),t.setStateByProcess(n)},onFail:r=>(t.setErrorMessage(r),n>0?(setTimeout((()=>{t.synchronizeStateWithBackend(e,--n)}),m.constants.statusSyncRetriesTimeoutMicroseconds),!0):((0,a.destroyComponentInBox)(),(0,f.showErrorBox)(i.default.getLang("login_unban_fetch_ban_data_internal_error")),!0))})},this.setStateByProcess=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.getStateByProcess(e);t.state.initialLoading&&(r.initialLoading=!1),n&&Object.assign(r,n),0!==t.state.unbanDataId&&void 0!==t.state.unbanDataId&&r.unbanDataId!==t.state.unbanDataId&&t.setErrorMessage(i.default.getLang("login_unban_data_expired")),t.setState(r),r.delayedUnblockExplanation||r.delayedUnblockFinished||(r.codeSent&&r.resendButtonSecondsLeft&&t.setResendCodeButtonTimer(),0===r.checkCodeAttemptsAmount&&t.resetPhone(!1))},this.getStateByProcess=e=>({phone:e.phone,code:e.code,password:e.password,phonePrefixInputNeeded:!e.phone,canEditPhone:e.can_edit_phone,codeSent:e.code_sent,checkCodeAttemptsAmount:Number(e.check_code_attempts_amount),backendCallResetsEnabled:e.call_resets_enabled,phonePrefixesCallResetsEnabledConfig:e.phone_prefixes_call_resets_enabled_config,phonePrefixesToCountryMapping:e.country_to_phone_prefixes_map,unbanDataId:e.unban_data_id,delayedUnblockExplanation:e.delayed_unblock_explanation,delayedUnblockFinished:e.delayed_unblock_finished,resendCodeTimer:m.constants.noResetCodeTimerEnabled,resendButtonSecondsLeft:e.sms_resend_delay_timer_left,resendAttemptsAmount:e.resend_attempts_amount,resendCodeDelay:e.sms_resend_delay,phonePrefixIndex:this.getInitialPhonePrefixIndex(e.country_to_phone_prefixes_map,e.phone_prefix),newPhone:e.phone,newCode:e.code,newPassword:"",processHash:e.process_hash,unblockHash:e.unblock_hash}),this.areCallResetsEnabled=()=>{if(null!==this.state.backendCallResetsEnabled)return this.state.backendCallResetsEnabled;var e=String(this.state.phonePrefixesToCountryMapping[this.state.phonePrefixIndex][0]),t=Number(e.replace("_",""));return!this.state.phonePrefixesCallResetsEnabledConfig.includes(t)},this.updateFocus=()=>{this.state.phone?this.state.phone&&!this.state.code&&this.state.codeSent?this.references.validationCodeInput.element.focus():this.state.phone&&this.state.code&&this.references.passwordInput.element.focus():this.references.phoneInput.element.focus()},this.setErrorMessage=e=>{"string"==typeof e&&this.setState({message:e,isError:!0})},this.setInfoMessage=e=>{this.setState({message:e,isError:!1})},this.resetMessage=()=>{this.setState({message:""})},this.isBusy=()=>this.state.mainButtonLoading||this.state.noCodeButtonLoading||this.state.resetUnblockDataButtonLoading,this.onDocumentKeyDown=e=>{e.keyCode===KEY.ENTER&&(this.references.mainButton.props.onClick(),e.stopPropagation(),e.preventDefault())},this.setResendCodeButtonTimer=()=>{if(this.state.resendCodeTimer===m.constants.noResetCodeTimerEnabled){var e=this.state.resendButtonSecondsLeft||this.state.resendCodeDelay;this.setState({resendCodeTimer:setInterval(this.resendCodeButtonTimerTick,l.SECOND),resendButtonSecondsLeft:e})}},this.resendCodeButtonTimerTick=()=>{var e=this.state.resendButtonSecondsLeft-1;this.setState({resendButtonSecondsLeft:e}),0===e&&this.removeResendCodeButtonTimer()},this.removeResendCodeButtonTimer=()=>{clearInterval(this.state.resendCodeTimer),this.setState({resendCodeTimer:m.constants.noResetCodeTimerEnabled,resendButtonSecondsLeft:0})},this.noResendsWereMade=()=>this.state.resendAttemptsAmount===m.constants.noCodeResentAmount,this.isLastResendStep=()=>this.state.resendAttemptsAmount===m.constants.maxCodeResentAmount,this.shouldRenderCallResetsSteps=()=>this.areCallResetsEnabled()?this.noResendsWereMade():this.isLastResendStep(),this.getCodeBlockHeaderLabel=()=>this.shouldRenderCallResetsSteps()?i.default.getLang("login_authcheck_called_phone_label"):i.default.getLang("login_confirmation_code"),this.getCodeBlockTooltipLabel=()=>this.shouldRenderCallResetsSteps()?this.props.tooltips.codeCallReset:this.props.tooltips.code,this.getResentInfoMessageText=()=>this.shouldRenderCallResetsSteps()?i.default.getLang("login_authcheck_call_reset_sent"):i.default.getLang("login_authcheck_sms_resent"),this.getResendCodeWaitingLabel=()=>{var e;e=this.areCallResetsEnabled()?this.noResendsWereMade()?i.default.getLang("join_send_code_via_sms_time"):i.default.getLang("join_resend_code_time"):this.noResendsWereMade()?i.default.getLang("join_resend_code_time"):i.default.getLang("login_authcheck_send_call_reset_delay");var t=Math.floor(this.state.resendButtonSecondsLeft/60)+":"+(this.state.resendButtonSecondsLeft%60<10?"0":"")+this.state.resendButtonSecondsLeft%60;return e.replace("%s",t)},this.getResendCodeButtonLabel=()=>this.areCallResetsEnabled()?this.noResendsWereMade()?i.default.getLang("join_send_code_via_sms"):i.default.getLang("join_no_code"):this.noResendsWereMade()?i.default.getLang("join_no_code"):i.default.getLang("login_authcheck_send_call_reset_message"),this.getInitialPhonePrefixIndex=(e,t)=>{var n=e.findIndex((e=>e[3]==t));return-1===n&&(n=m.constants.firstCountryIndex),n},this.mapPhonePrefixesToOption=()=>this.state.phonePrefixesToCountryMapping.map(((e,t)=>({constant:t,name:e[1]}))),this.getPhonePrefix=()=>this.state.phonePrefixesToCountryMapping[this.state.phonePrefixIndex][3],this.renderResendCodeButton=()=>{var e;if(this.state.resendAttemptsAmount===m.constants.maxCodeResentAmount)e=r.createElement("div",{className:"resend_button resend_button--waiting"},i.default.getLang("reg_code_limit_exceeded"));else if(0===this.state.resendButtonSecondsLeft)e=r.createElement(s.default,{appearance:"link",loading:this.state.noCodeButtonLoading,className:"resend_button",onClick:this.resendCode},this.getResendCodeButtonLabel());else{var t=this.getResendCodeWaitingLabel();e=r.createElement("div",{className:"resend_button resend_button--waiting"},t)}return r.createElement("div",{className:"resend_button_wrap"},e)},this.renderPhonePrefixBlock=()=>{if(!this.state.phonePrefixInputNeeded)return"";var e=this.state.phone?m.constants.finishedClass:"";return r.createElement("div",{className:`input phone_number_prefix_input ${e}`},r.createElement("div",{className:"label"},i.default.getLang("join_country_label")),r.createElement(u.default,{className:`dark phone_number_prefix _phone_input_tooltip ${e}`,config:{id:"phone_number_prefix",placeholder:"",selected:[this.state.phonePrefixIndex],options:this.mapPhonePrefixesToOption()},singleSelectCrutch:!0,onFilterChange:(e,t)=>{this.setState({phonePrefixIndex:null===t?this.state.phonePrefixIndex:t})},readOnly:!!this.state.phone}))},this.renderPhoneBlock=()=>{var e=this.state.phone&&!this.state.code&&this.state.canEditPhone?r.createElement("a",{className:"_change_phone_button",onClick:()=>this.resetPhone(!0)},i.default.getLang("login_unblock_form_change_phone")):"",t=this.state.phonePrefixInputNeeded?this.getPhonePrefix():"",n=this.state.phone?m.constants.finishedClass:"",o=!this.state.phone&&!this.state.code&&this.state.phonePrefixInputNeeded,a=this.state.newPhone;return r.createElement("div",{className:"input phone_number_input"},r.createElement("div",{className:"label"},i.default.getLang("login_mobile_phone")),e,r.createElement(d.default,{text:this.getPhoneBlockTooltipLabel(),appearance:m.constants.tooltipAppearance,position:m.constants.tooltipPosition,width:m.constants.tooltipWidth,marginLeft:m.constants.tooltipMarginLeft,isShown:o},r.createElement("div",{id:"join_phone_prefixed",className:`prefix_input_wrap ${n}`},r.createElement("div",{id:"join_phone_prefix",className:"prefix_input_prefix"},r.createElement("nobr",null,t)),r.createElement("div",{className:"prefix_input_field"},r.createElement(c.default,{className:`prefix_input phone_number _phone_input_tooltip ${n}`,value:a,readOnly:!!this.state.phone,onChange:e=>this.setState({newPhone:e.target.value}),ref:e=>{this.references.phoneInput=e}}),r.createElement("div",{className:"prefix_input_border"})))))},this.renderCodeBlock=()=>{if(!this.state.phone)return"";if(!this.state.codeSent)return"";var e=this.getCodeBlockHeaderLabel(),t=this.state.code?m.constants.finishedClass:"",n=this.state.phone&&!this.state.code,o=!!this.state.code;return r.createElement("div",{className:"input verification_code_input"},r.createElement("div",{className:"label"},e),r.createElement(d.default,{text:this.getCodeBlockTooltipLabel(),appearance:m.constants.tooltipAppearance,position:m.constants.tooltipPosition,width:m.constants.tooltipWidth,marginLeft:m.constants.tooltipMarginLeft,isShown:n},r.createElement(c.default,{className:`verification_code _verification_code_input_tooltip dark ${t}`,ref:e=>{this.references.validationCodeInput=e},placeholder:i.default.getLang("login_authcheck_enter_code"),value:this.state.newCode,readOnly:o,onChange:e=>this.setState({newCode:e.target.value})})))},this.renderPasswordBlock=()=>{if(!this.state.phone||!this.state.code)return"";var e=m.checkPasswordStrength(this.state.newPassword),t=this.state.newPassword?r.createElement("div",{id:"blocked_about_pass",className:"blocked_pwd_level"+e}):"",n=this.state.newPassword?r.createElement("div",{className:"blocked_pass_strength blocked_about_login"},i.default.getLang(`join_pwd_level${e}`)):"",o=!this.state.password;return r.createElement("div",{className:"input new_password_input"},r.createElement("div",{className:"label"},i.default.getLang("login_new_password_label")),r.createElement(d.default,{text:this.props.tooltips.password,appearance:m.constants.tooltipAppearance,position:m.constants.tooltipPosition,width:m.constants.tooltipWidth,marginLeft:m.constants.tooltipMarginLeft,isShown:o},r.createElement(c.default,{className:"dark new_password _password_input_tooltip",ref:e=>{this.references.passwordInput=e},placeholder:i.default.getLang("login_enter_password"),value:this.state.newPassword,onChange:e=>this.setState({newPassword:e.target.value})})),t,n)},this.renderMainButton=()=>{var e,t,n,o=this.areCallResetsEnabled()?i.default.getLang("reg_validate_call_reset_button"):i.default.getLang("login_receive_code");if(this.state.phone||this.state.code)if(this.state.phone&&!this.state.code)this.state.codeSent?(e=this.checkCode,t=i.default.getLang("login_check_code"),n=this.renderResendCodeButton()):(e=this.sendCodeToBoundPhone,t=o,n="");else{if(!this.state.phone||!this.state.code)return"";e=this.unblock,t=i.default.getLang("login_blocked_unblock_page"),n=""}else e=this.sendCode,t=o,n="";return r.createElement("div",null,r.createElement(s.default,{className:"UnblockForm__mainButton",loading:this.state.mainButtonLoading,onClick:e,ref:e=>{this.references.mainButton=e}},t),n)},this.renderMessage=()=>{if(!this.state.message)return"";var e=this.state.isError?"error":"";return r.createElement("div",{id:"unblock_box_errors_block"},r.createElement("div",{className:"msg submit_error "+e,dangerouslySetInnerHTML:{__html:this.state.message}}))},this.renderContent=()=>this.state.initialLoading?m.renderInitialLoading():this.state.delayedUnblockExplanation?this.renderDelayedWaitExplanation():this.state.delayedUnblockFinished?this.renderDelayedUnblockFinishedScreen():r.createElement("div",{className:"UnblockForm__content__inputs"},this.renderPhonePrefixBlock(),this.renderPhoneBlock(),this.renderCodeBlock(),this.renderPasswordBlock(),this.renderMainButton()),this.renderDelayedWaitExplanation=()=>r.createElement("div",{className:"DelayedWaitExplanation"},r.createElement("div",{className:"DelayedWaitExplanation__message msg submit_error ",dangerouslySetInnerHTML:{__html:i.default.getLang("restore_change_phone_done_wait_banned").replace("{date}",this.state.delayedUnblockExplanation)}}),r.createElement("div",{className:"DelayedWaitExplanation__progressWrap"},r.createElement(s.default,{appearance:"tertiary",loading:this.state.resetUnblockDataButtonLoading,onClick:this.resetUnblockForm},i.default.getLang("login_delayed_its_not_me")))),this.renderDelayedUnblockFinishedScreen=()=>r.createElement("div",{id:"unblock_box_errors_block"},r.createElement("div",{className:"msg submit_error ",dangerouslySetInnerHTML:{__html:i.default.getLang("login_delayed_request_finished")}}),r.createElement("div",{className:"DelayedRequestFinished__button"},r.createElement(s.default,{loading:this.state.redirectToAuthButtonLoading,onClick:this.redirectToAuth},i.default.getLang("login_unblock_redirect_to_auth"))),r.createElement("div",{className:"DelayedRequestFinished__notMeButton"},r.createElement(s.default,{appearance:"tertiary",loading:this.state.resetUnblockDataButtonLoading,onClick:this.resetUnblockForm},i.default.getLang("login_delayed_its_not_me")))),this.render=()=>r.createElement("div",{className:"UnblockForm"},r.createElement("div",{className:"UnblockForm__header box_title_wrap"},r.createElement("div",{className:"box_x_button",role:"button",onClick:a.destroyComponentInBox},r.createElement(h.default,null)),r.createElement("div",{className:"box_title"},i.default.getLang("login_blocked_call_title"))),r.createElement("div",{className:"UnblockForm__content box_body clear_fix"},r.createElement("div",{className:"login_blocked_wrap"},r.createElement("div",{className:"unblock_form"},r.createElement("div",{className:"UnblockForm__content__header"},r.createElement("div",{className:"antispam_team_logo"}),r.createElement("div",{className:"reason"},i.default.getLang("login_unblock_form_explanation"))),this.renderMessage(),this.renderContent())))),this.state={initialLoading:!0},this.references={phoneInput:null,validationCodeInput:null,passwordInput:null,mainButton:null}}setInitialState(){this.setState({message:"",isError:!1,initialLoading:!0,mainButtonLoading:!1,noCodeButtonLoading:!1,resetUnblockDataButtonLoading:!1,redirectToAuthButtonLoading:!1})}getPhoneBlockTooltipLabel(){return this.areCallResetsEnabled()?this.props.tooltips.phoneCallReset:this.props.tooltips.phone}}m.controller="/al_login.php",m.acts={getStatus:"get_unblock_process_status",sendCode:"send_unblock_code",sendCodeToBoundPhone:"send_unblock_code_to_bound_phone",resendCode:"resend_unblock_code",checkCode:"check_unblock_code",unblock:"unblock",resetUnblockForm:"reset_unblock_form"},m.constants={finishedClass:"finished",maxCodeResentAmount:2,noCodeResentAmount:0,firstCountryIndex:0,noResetCodeTimerEnabled:0,tooltipWidth:250,tooltipMarginLeft:5,tooltipAppearance:"white",tooltipPosition:"r",statusSyncRetriesCount:10,statusSyncRetriesTimeoutMicroseconds:1e3,passwordStrengths:{none:-1,incorrectTooShort:0,weakTypical:1,good:2,veryGood:3,excellent:4,incorrectHasSpaces:5}},m.refreshAuthDataAndRedirectToFeed=(e,t,n,r)=>{var o=utilsNode.appendChild(ce("div",{innerHTML:'\n      <form id="login_block_auth_form" target="login_block_auth_frame" action="" method="POST">\n        <input type="hidden" name="_origin" id="login_server_origin" />\n        <input type="hidden" name="email" id="login_block_email" />\n        <input type="hidden" name="pass" id="login_block_pass" />\n      </form>\n      <iframe name="login_block_auth_frame" id="login_block_auth_frame"></iframe>'})),i=window.onLoginDone,a=ge("login_block_auth_form");a.action=(0,p.getLoginDomain)()+"?act=login&ip_h="+t+"&lg_domain_h="+e+"&redirect=1&role=al_frame",val("login_block_email",winToUtf(n)),val("login_block_pass",winToUtf(r)),val("login_server_origin",cur.serverOrigin),a.submit(),cur.destroy.push((()=>{re(o),window.onLoginDone=i})),window.onLoginDone=()=>{re(o),nav.go("/feed",!0)}},m.isBadPassword=e=>{var t=[m.constants.passwordStrengths.incorrectHasSpaces,m.constants.passwordStrengths.incorrectTooShort],n=m.checkPasswordStrength(e);return t.includes(n)},m.checkPasswordStrength=e=>{var t=m.constants.passwordStrengths.none,n=["qwerty","йцукен","gfhjkm","пароль","password","abc123","fuckyou","123abc","baseball","football","soccer","monkey","liverpool","princess","jordan","slipknot","superman","iloveyou"];if(e.length<6)t=m.constants.passwordStrengths.incorrectTooShort;else if(/\s/.test(e))t=m.constants.passwordStrengths.incorrectHasSpaces;else if(e.match(/^\d+$/)||n.indexOf(e)>=0||e.substr(-1).match(/\d/)&&n.indexOf(e.substr(0,e.length-1))>=0)t=m.constants.passwordStrengths.weakTypical;else{for(var r=[/[^a-z]/g,/[^A-Z]/g,/[^а-яё]/g,/[^А-ЯЁ]/g,/[^0-9]/g,/[a-zA-Zа-яА-ЯёЁ0-9]/g],o=[],i=0,a=0,s=r.length;a<s;++a){var c=e.replace(r[a],"").length;c&&(c>1&&i++,o.push({group:a,cnt:c}))}if(o.length<3&&o[o.length-1].group!=r.length-1&&i<2&&(t=m.constants.passwordStrengths.good),(i>2||o.length>2&&o[o.length-1].group==r.length-1)&&(t=m.constants.passwordStrengths.excellent),t<0&&i>1){var l=e.replace(r[r.length-1],"");l.length>1&&l.replace(new RegExp(escapeRE(l.charAt(0)),"g"),"").length&&(t=m.constants.passwordStrengths.excellent)}t<0&&(t=m.constants.passwordStrengths.veryGood),t&&t<3&&e.length>13&&t++}return t},m.renderInitialLoading=()=>r.createElement("div",{className:"InitialLoading"},r.createElement(_.default,null))},378486:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});n(175115);var r=n(667294),o=n(973935),i=(n(45697),n(483295)),a=n(49030);class s extends r.Component{constructor(e){super(e),this.addTooltip=e=>{if(this.el){var t=this.props,n=t.text,r=t.position,o=t.align,i=t.marginTop,s=t.marginLeft,c=(0,a.default)(this.el);this.update({text:n,position:r,align:o,rect:c,marginTop:i,marginLeft:s})}},this.removeTooltip=e=>{document.activeElement!==this.inputEl&&this.update({remove:!0})},this.renderTooltip=()=>{if(!this.state.tooltip)return null;var e=this.state.tooltip,t=e.x,n=e.y,o=e.position,a=e.align,s=e.text,c=e.removed,l=this.props,u=l.appearance,d=l.width,_=(0,i.classNames)("UnblockTooltip",`UnblockTooltip--${o}`,`UnblockTooltip--${u}`,{"UnblockTooltip--removed":!!c,[`UnblockTooltip--align-${a}`]:"t"===o||"b"===o}),p={top:n,left:t},h=d?{width:d}:{};return r.createElement("div",{className:_,style:p},r.createElement("div",{className:"UnblockTooltip__in",style:h,dangerouslySetInnerHTML:{__html:s}}))},this.state={}}componentDidMount(){this.el=o.findDOMNode(this),this.inputEl="INPUT"===this.el.tagName?this.el:this.el.getElementsByTagName("input")[0],this.backgroundElement=document.getElementById("box_layer_wrap"),this.el.addEventListener("mouseenter",this.addTooltip),this.el.addEventListener("mouseleave",this.removeTooltip),this.inputEl.addEventListener("focus",this.addTooltip),this.inputEl.addEventListener("blur",this.removeTooltip),this.backgroundElement.addEventListener("scroll",this.addTooltip),window.addEventListener("resize",this.addTooltip)}componentWillUnmount(){this.el.removeEventListener("mouseenter",this.addTooltip),this.el.removeEventListener("mouseleave",this.removeTooltip),this.inputEl.removeEventListener("focus",this.addTooltip),this.inputEl.removeEventListener("blur",this.removeTooltip),this.backgroundElement.addEventListener("scroll",this.addTooltip),window.removeEventListener("resize",this.addTooltip)}update(e){var t=e.position,n=e.align,r=e.text,o=e.rect,i=e.marginTop,a=e.marginLeft,s=!o||0===o.top&&0===o.left;if(!0!==e.remove&&this.props.isShown&&!s){var c=o.left,l=o.top;switch(t){case"t":c+=.5*o.width;break;case"r":c+=o.width,l+=.5*o.height;break;case"b":c+=.5*o.width,l+=o.height;break;case"l":l+=.5*o.height}c=Math.round(c+a),l=Math.round(l+i),this.setState({tooltip:{position:t,align:n,text:r,x:c,y:l}})}else this.setState({tooltip:Object.assign({},this.state.tooltip,{removed:!0})})}render(){var e=this.renderTooltip();return e?(this.defaultNode||"undefined"==typeof window||(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),r.createElement(r.Fragment,null,this.props.children,o.createPortal(e,this.defaultNode))):this.props.children}}s.defaultProps={appearance:"black",position:"b",align:"center",marginTop:0,marginLeft:0}},468770:(e,t,n)=>{"use strict";n.d(t,{initLoginBoxForm:()=>p,initLoginCombinedBoxForm:()=>h,Login:()=>f});var r=n(7739),o=n(667294),i=n(499284),a=n(481117),s=n(315544),c=n(699937),l=n(528958),u=n(70488),d=n(985048),_=n(559367);function p(e){e&&new l.LoginBoxForm(e)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.querySelector('.LoginRecentBox [name="ul"]'),r=e.querySelector(".LoginRecentBox__alternative"),o=e.querySelector(".LoginRecentBox .LoginBox__title");r.addEventListener("click",(t=>{t.preventDefault(),e.classList.add("LoginCombinedBox--standard")}));var i=new c.LoginRecentUsersGallery(e.querySelector(".LoginRecentBox__users"));i.onChange=e=>{var r=t.users[e];r&&(o.innerHTML=r.title,n&&(n.value=r.encrypted))},i.init(),e.querySelectorAll(".LoginRecentBox__user").forEach(((e,t)=>{e.addEventListener("click",(()=>{i.setIndex(t)}))}))}var f={init(){each(geByClass("big_text","login_form_wrap"),((e,t)=>{placeholderInit(t)})),setTimeout(s.elfocus.pbind(!isVisible("email")||val("email")?"pass":"email"),0);var e=ge("login_form"),t=ge("email"),n=ge("pass"),r=val("login_ul");return e.onsubmit=()=>{if(!window.submitQuickLoginForm)return!0;if(!r&&!trim(t.value))return notaBene(t),!1;if(!trim(n.value))return notaBene(n),!1;var e={expire_input:val("expire_input")};r&&(e.ul=r);var o=(0,d.isEmail)(t.value)?u.RegistrationItemEventTypes.INPUT_EMAIL:u.RegistrationItemEventTypes.INPUT_PHONE;return u.registrationItemStat.logEvent(o,cur.eventScreen,void 0,{force:!0}),submitQuickLoginForm(t.value,n.value,{prg:"login_button",params:e}),!1},window.loginByCredential&&!r&&(t.onclick=loginByCredential,n.onclick=loginByCredential),!0},initBlockedPage(){r.FAQTutorial.tryInit()},initBox(){var e=curBox();e.changed=!0,e.setOptions({width:560,onClean:()=>{},hideButtons:!0,bodyStyle:"padding: 0"}),p(document.querySelector(".LoginBox"))},initVkId(){var e=document.querySelector(".VkIdLogin");e&&(0,_.initVkIdForm)(e)},changeMail(e,t,n){var r=trim(val("login_new_mail")),o=1;return r?(e&&(n=cur.changeMailHash),-1==r.indexOf("@")?showMsg("login_change_mail_error",getLang("reg0_error_bad_email"),"error"):(e&&(o=0),void ajax.post("/login?act=a_change_mail",{newmail:r,hash:n,from_page:o},{onDone(t){var n="login_change_mail_form";e&&(n="login_change_mail_box",curBox().removeButtons(),curBox().addButton(getLang("global_cancel"),null,"no")),val(n,t)},onFail:e=>(showMsg("login_change_mail_error",e,"error"),!0),showProgress:lockButton.pbind(t),hideProgress:unlockButton.pbind(t)}))):notaBene("login_new_mail")},initChangeMailBox(){curBox().removeButtons(),curBox().addButton(getLang("global_cancel"),null,"no"),curBox().addButton(getLang("reg0_change_mail"),f.changeMail.pbind(1)),(0,s.elfocus)("change_mail_new")},isBanExpired:()=>cur.unblockDate<Date.now()/1e3,canUnblockFast:()=>!0===cur.canUnblockFast,showUnblockForm(){(0,a.showComponentInBox)(o.createElement(i.default,{tooltips:{phone:cur.phoneTooltip,phoneCallReset:cur.phoneCallResetTooltip,code:cur.verificationCodeTooltip,codeCallReset:cur.verificationCodeCallResetTooltip,password:cur.passwordTooltip}}))},fastUnblock:e=>{var t={act:"fast_unblock",hash:e},n=document.getElementsByClassName("unblock_button--fast")[0];n?ajax.post("/al_login.php",t,{onDone:function(){showDoneBox(getLang("login_fast_unblocked_wait_description"),{out:5e3}),nav.reload()},onFail:function(e){return unlockButton(n),showDoneBox(e),!0},showProgress:()=>lockButton(n)}):showFastBox(getLang("global_error"))},showDeletePageBox(){showFastBox(getLang("login_blocked_delete_page_header"),getLang("login_blocked_sure_delete_page_question"),getLang("box_yes"),(()=>{ajax.post("al_settings.php",{act:"a_deactivate",hash:cur.deactivate_hash},{onDone:e=>{showDoneBox(e),nav.go("/id"+vk.id)},onFail:e=>{showDoneBox(e),curBox().hideProgress()}})}),getLang("box_no"))}}},790008:(e,t,n)=>{"use strict";n.d(t,{processAliExpressMiniAppLinkClickEvent:()=>a});n(21466),n(283946);var r=n(718253),o=n(19331),i=n(961540);function a(e){var t=e.target||e.srcElement;if(t&&t.href){var n,a,c=t.href;try{n=decodeURIComponent(c)}catch(e){return console.error(e,"Error decoding URL: "+c),!1}if((0,o.partConfigEnabled)("aliexpress_app_links_redirect_web_links")){if(a=function(e){var t=[new RegExp(`(https?://)?${i.VK_SITE_REGEX_SOURCE_UNSAFE}/app${r.MARKET_ALIEXPRESS_APP_ID}(_6492794)?(#|/|#/)?$`),new RegExp(`(https?://)?${i.VK_SITE_REGEX_SOURCE_UNSAFE}/${r.MARKET_ALIEXPRESS_APP_NAME}(#|/|#/)?$`)];for(var n in t)if(e.match(t[n]))return"/away.php?to="+encodeURIComponent(r.MARKET_ALIEXPRESS_HOME_URL);return""}(n),a)return s(a,t),!0}else if(a=function(e){var t=e.match(new RegExp(`/app${r.MARKET_ALIEXPRESS_APP_ID}#(?:.+)product_id=(d+)`));if(t&&t[1])return"/away.php?to="+encodeURIComponent(`${r.MARKET_ALIEXPRESS_HOME_URL}/item/${t[1]}.html`)}(n),a)return s(a,t),!0}return!1}function s(e,t){"_blank"===t.getAttribute("target")&&void 0!==t.open?t.open(e):window.location.href=e}},379633:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});n(940851),n(296253);var r=n(22379),o=n(654612),i=n(486125),a=n(315544);class s extends r.default{constructor(e,t){super(e,t),this.canBeEnabled().then((e=>{e&&(addClass(document.head,"push_notifier_supported"),this.handlerMessagesLP=this.handlerMessagesLP.bind(this))}))}isSupported(){return super.isSupported()&&(browser.chrome||browser.mozilla)}handlerMessagesLP(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type,n=e.peerId,r=e.upToId;"event_read_inbound"===t&&this.sw.action("removeMessageNotification",{peerId:n,msgId:r})}handlerPopup(e,t){var n=(0,i.curBox)();n&&(0,a.hide)(n.bodyNode),this.setupSubscription().then((()=>this.setState(e,t,"popup"))).then((()=>{n&&n.hide()})).catch((e=>{r.default.PUSH_NOTIFIER_BLOCKED_BY_BROWSER_SETTINGS===e?((0,a.show)(n().bodyNode),this.showPopupAllowNotification()):(0,o.showFastBox)(getLang("global_error"),getLang("notifications_native_common_error"))}))}showPopupAllowNotification(){(0,o.showBox)(r.default.SERVER_URL,{act:"popup_allow_notification"},{params:{hideButtons:!0},containerClass:"PushNotifierPopup__popup-box_type--allow-notification"})}showPopupSuggestion(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"feed";(0,o.showBox)(r.default.SERVER_URL,{act:"popup_suggestion",old:Number(ls.get("im_notify_flag")),module:e},{params:{hideButtons:!0,width:400},containerClass:"PushNotifierPopup__popup-box_type--suggest",onDone:()=>{ajax.post(r.default.SERVER_URL,{act:"open_popup"},{onFail:()=>!0})}})}_removeLongPollListener(){this.lp&&this.lp.offData(this.handlerMessagesLP),this.lp=null}_addLongPollListener(){!this.lp&&window.Notifier&&(this.lp=Notifier.getLpInstance(),this.lp&&this.lp.onData(this.handlerMessagesLP))}setState(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"settings";return new Promise(((o,i)=>{ajax.post(r.default.SERVER_URL,{act:"a_toggle_state",state:e,hash:t,from:n},{onDone:e=>e?o():i(),onFail:i})}))}update(){return super.update().then((()=>this._addLongPollListener()))}unsubscribe(e){return super.unsubscribe(e).then((()=>this._removeLongPollListener()))}}const c=s},22379:(e,t,n)=>{"use strict";n.d(t,{default:()=>u});n(83276),n(991181),n(446964),n(940851),n(296253);var r=n(19331),o=n(900421),i=n(22463),a=n(26330),s="push_notifier_endpoint",c="push_notifier_subscribed_ts";class l{constructor(e,t){this.sw=e,this.SWClient=t,vk.id&&this.canBeEnabled().then((e=>{e&&(this.listenPermission(),this.loadEndpoint()&&this.update().then(this.checkMessageState.bind(this)))}))}static getPermission(){return Notification.permission}cleanNotification(){this.sw.action("cleanNotification")}canBeEnabled(){return Promise.resolve(this.isSupported())}isSupported(){return"PushManager"in window&&"Notification"in window&&this.SWClient.isSupported()}loadEndpoint(){return a.default.get(s+vk.id)||!1}saveEndpoint(e){a.default.set(s+vk.id,e||!1)}action(e,t){return this.sw.action(e,t)}_needupdate(e){var t=Date.now(),n=this.loadEndpoint(),r=a.default.get(c+vk.id),o=!1;return(n!==e.endpoint||!r||t-r>6e4)&&(a.default.set(c+vk.id,t),o=!0),o}listenPermission(){(0,r.partConfigEnabled)("push_notifier")&&navigator.permissions&&navigator.permissions.query&&navigator.permissions.query({name:"notifications"}).then((e=>{e.onchange=()=>this.update()}))}update(){return this.updatePermission().then((e=>e===l.PUSH_NOTIFIER_PERMISSION_GRANTED?this.subscribe().catch((e=>{e!==l.SUBSCRIBE_ERROR_NETWORK&&(0,i.error)("can not update subscribe")})):Promise.reject("premession_not_granted"))).catch(i.error)}updatePermission(){var e=l.getPermission();if(e!==l.PUSH_NOTIFIER_PERMISSION_GRANTED){var t=this.loadEndpoint();if(t)return this.unsubscribe(t).then((()=>e))}return Promise.resolve(e)}processSubscribe(e){return e.subscribe({userVisibleOnly:!0,applicationServerKey:(0,o.urlBase64ToUint8Array)(l.SERVER_KEY)})}setupSubscription(){return new Promise(((e,t)=>{var n=l.getPermission(),r=()=>{this.subscribe(!0).then((()=>{e()})).catch((()=>{t()}))};n!==l.PUSH_NOTIFIER_PERMISSION_DENIED?n!==l.PUSH_NOTIFIER_PERMISSION_GRANTED?n===l.PUSH_NOTIFIER_PERMISSION_DEFAULT&&this.requestPermission().then((e=>{e===l.PUSH_NOTIFIER_PERMISSION_GRANTED?r():t()})):r():t(l.PUSH_NOTIFIER_BLOCKED_BY_BROWSER_SETTINGS)}))}subscribe(e){return this.sw.register().then((e=>{var t=e.pushManager;return t.getSubscription().then((e=>{if(e){var n=e.expirationTime;return n&&Date.now()>n-432e6?this.unsubscribe(this.loadEndpoint()).then((()=>this.processSubscribe(t))):e}return this.processSubscribe(t)}))})).then((t=>new Promise(((n,r)=>{if(e||this._needupdate(t)){var o=t.getKey("p256dh"),i=t.getKey("auth");window.ajax.post(l.SERVER_URL,{act:"a_subscribe",hash:this.sw.getPushHash(),endpoint:t.endpoint,key:o?btoa(String.fromCharCode.apply(null,new Uint8Array(t.getKey("p256dh")))):null,token:i?btoa(String.fromCharCode.apply(null,new Uint8Array(t.getKey("auth")))):null},{onDone:e=>{e?(this.saveEndpoint(t.endpoint),n()):r()},onFail:()=>(r(l.SUBSCRIBE_ERROR_NETWORK),!0)})}else n()}))))}unsubscribe(e){return this.sw.register().then((t=>t.pushManager.getSubscription().then((t=>t?t.unsubscribe().then((t=>t?new Promise(((t,n)=>{ajax.post(l.SERVER_URL,{act:"a_unsubscribe",endpoint:e},{onDone:e=>{e?(this.saveEndpoint(!1),t()):n()}})})):Promise.reject("ERROR: can not unsubscribe"))):(this.saveEndpoint(!1),Promise.reject("ERROR: no subscription"))))))}requestPermission(){var e=l.getPermission();return e===l.PUSH_NOTIFIER_PERMISSION_DEFAULT?new Promise((function(e,t){var n=Notification.requestPermission((function(t){e(t)}));n instanceof Promise&&n.then(e,t)})):Promise.resolve(e)}checkMessageState(){return new Promise((e=>setTimeout(e,5e3))).then((()=>this.action("getMessagesMetaData"))).then((e=>"object"==typeof e&&Object.keys(e).length?new Promise(((t,n)=>{window.ajax.post(l.SERVER_URL,{act:"a_update_messages_state",data:Object.entries(e)},{onDone:e=>{e?t(e):n("ERROR: act error")},onFail:()=>(n("ERROR: network error"),!0)})})):Promise.resolve({}))).then((e=>{try{return JSON.parse(e)}catch(e){return{}}})).then((e=>this.action("updateMessageNotifications",e))).catch((e=>(0,i.error)(e)))}}l.SERVER_KEY="BPrntRk2W1_ISFwlgY-vz9tQDg9i1oSQ3-N8xyjdbNAbIOdZIGFdh5FlO7zn730UwU9Sayoec-Fpqq4JZFTyv60",l.SERVER_URL="push_notifier",l.PUSH_NOTIFIER_PERMISSION_GRANTED="granted",l.PUSH_NOTIFIER_PERMISSION_DEFAULT="default",l.PUSH_NOTIFIER_PERMISSION_DENIED="denied",l.PUSH_NOTIFIER_BLOCKED_BY_BROWSER_SETTINGS="BLOCKED_BY_BROWSER_SETTINGS",l.SUBSCRIBE_ERROR_NETWORK="SUBSCRIBE_ERROR_NETWORK";const u=l},291587:(e,t,n)=>{"use strict";n.d(t,{AppOrderBox:()=>l});var r=n(315544),o=n(486125),i=n(386409),a=n(654612),s=n(982452),c=n(965030);class l{static instantSkipAppOrder(e,t){var n=gpeByClass("payments_instant_progress_wrap",e),r={act:"a_order",aid:cur.paymentsOrderAppId,order_id:cur.paymentsOrderId,votes:cur.paymentsPreferVotes,test_mode:cur.paymentsOrderTestMode,_skip_instant:t||1,hash:cur.paymentsOrderHash};void 0!==cur.checkedMaxVotes&&(r.checked_max_votes=cur.checkedMaxVotes),ajax.post("al_apps.php",r,{forceDone:1,onDone:()=>{cur.paymentsCheckOrderCnt=1,(0,o.curBox)().hide(),cur.paymentsCheckOrderCnt=0,cur.fromInstantPay=!0},showProgress:addClass.pbind(n,"loading"),hideProgress:removeClass.pbind(n,"loading")})}static processOrder(e,t){t||(t=(0,o.curBox)());var n=(0,r.isVisible)("payments_box")?2:0,u=!1;e||(e=n),n&&(u=t.btns.ok[0],(0,i.lockButton)(u));var d={act:"a_order",aid:cur.paymentsOrderAppId,order_id:cur.paymentsOrderId,votes:cur.paymentsPreferVotes,from:nav.objLoc[0],test_mode:cur.paymentsOrderTestMode,_votes_ok:e,hash:cur.paymentsOrderHash};1==e&&cur.paymentsOrderBillPeriod&&(d.payment_type=cur.votesType),!cur.paymentsOrderBillPeriod&&ge("payments_order_auto_confirm")&&(d.auto_confirm=(0,i.isChecked)("payments_order_auto_confirm")),ajax.post("al_apps.php",d,{forceDone:3==+e?1:0,onDone:(r,d,_,p,h)=>{if(p&&-1e3!==p&&(cur.votesBoxOptions=p),3==e&&-1e3==_)return c.Gifts.processBoxOptions((0,o.curBox)(),p),cur.paymentsCheckOrderCnt=1,t.hide(),void(cur.paymentsCheckOrderCnt=0);if(0===_||_>0)return cur.paymentsPreferVotes=1,n?cur.paymentsShowBoxError(d):(t.hide(),(0,a.showFastBox)(getLang("global_error"),d)),void((cur.paymentsOrderBillPeriod||h)&&cur.onSubscriptionFail?cur.onSubscriptionFail(_):cur.onAppOrderFail&&cur.onAppOrderFail(_));if(r.result){var f=(0,o.curBox)();return cur.isPaymentsAppOrder=!1,f&&f.hide(),(0,o.showDoneBox)(d),r.balance&&(0,s.updateMoney)(r.balance),void(cur.onSubscriptionDone&&r.subscriptionStatus&&(cur.onSubscriptionDone(r.subscriptionStatus),cur.onSubscriptionDone=!1))}var m=r.orderId;if(m){d&&(t=(0,a.showFastBox)("",d)).setOptions({title:!1,width:520,bodyStyle:"padding: 0;",hideButtons:!0}),u&&(0,i.unlockButton)(u),cur.isPaymentsAppOrder=!1,cur.paymentsOrderId=m,r.subscriptionId&&(cur.paymentsSubscriptionId=r.subscriptionId),cur.paymentsOrderCheckHash=r.checkHash;var v=getLang("payments_waiting_app_order_complete");ge("payments_box_progress_msg_wrap")?(val("payments_box_progress_msg_wrap",`<span id="payments_box_progress_msg">${v}</span>`),cur.paymentsShowProgress()):val("apps_paymentbox_progress_msg_wrap",v),cur.paymentsCheckOrderCnt=0,cur.paymentsCheckOrderInt=setInterval(l.checkOrder,2e3)}else cur.paymentGetOrderItemTO=setTimeout(l.processOrder.pbind(!1,t),1e3)},onFail:function(e){return!e||(cur.onSubscriptionFail?cur.onSubscriptionFail():cur.onAppOrderFail&&cur.onAppOrderFail(),(0,r.isVisible)("payments_box")?cur.paymentsShowBoxError(e):(t.hide(),(0,a.showFastBox)(getLang("global_error"),e)),!0)}})}static checkOrder(){if(15==cur.paymentsCheckOrderCnt)ge("payments_box_progress_msg").innerHTML=getLang("payments_waiting_payment_complete_still");else if(cur.paymentsCheckOrderCnt>30)return clearInterval(cur.paymentsCheckOrderInt),(0,o.curBox)().hide(),void(0,a.showFastBox)(getLang("payments_app_order_box_title"),getLang("payments_app_add_votes_delay"),getLang("global_close"),(()=>{cur.paymentsOrderBillPeriod&&cur.onSubscriptionCancel?cur.onSubscriptionCancel():cur.onAppOrderCancel&&cur.onAppOrderCancel(),(0,o.curBox)().hide()}));cur.paymentsCheckOrderCnt++,ajax.post("al_apps.php",{act:"a_check_order",aid:cur.paymentsOrderAppId,order_id:cur.paymentsOrderId,test_mode:cur.paymentsOrderTestMode,from:nav.objLoc[0],hash:cur.paymentsOrderCheckHash},{onDone:(e,t,n,r,i)=>{e&&((0,o.curBox)()&&(0,o.curBox)().hide(),clearInterval(cur.paymentsCheckOrderInt),cur.paymentsCheckOrderCnt=0,window.toggleFlash(!1),(0,o.showDoneBox)(t,{out:1e3,callback:()=>{window.toggleFlash(!0)}}),n&&(0,s.updateMoney)(n),1==e?(cur.paymentsOrderBillPeriod&&cur.onSubscriptionSuccess?(cur.onSubscriptionSuccess(cur.paymentsSubscriptionId),TopNotifier&&TopNotifier.invalidate()):cur.onAppOrderSuccess&&cur.onAppOrderSuccess(cur.paymentsOrderId),cur.onSubscriptionDone&&i&&(cur.onSubscriptionDone(i),cur.onSubscriptionDone=!1)):cur.paymentsOrderBillPeriod&&cur.onSubscriptionFail?cur.onSubscriptionFail(r):cur.onAppOrderFail&&cur.onAppOrderFail(r))},onFail:function(e){return clearInterval(cur.paymentsCheckOrderInt),cur.paymentsShowBoxError(e),!0}})}static initialize(e,t,n,r,o,i,a){extend(cur,{isPaymentsAppOrder:!0,paymentsAuthPayment:!1,paymentsOrderNotice:!1,paymentsOrderId:e,paymentsOrderAppId:t,paymentsOrderTestMode:n,paymentsOrderHash:r,paymentsPreferVotes:o,paymentsOrderDiscount:i,paymentsOrderBillPeriod:a})}}},962857:(e,t,n)=>{"use strict";n.d(t,{MoneyTransfer:()=>A});n(175115),n(991181),n(579665),n(95767),n(530522),n(66108),n(296253),n(59357),n(283946),n(21466);var r=n(386409),o=n(654612),i=n(315544),a=n(159121),s=n(982452),c=n(695724),l=n(787481),u=n(460615),d=n(786067),_=n(376624),p=n(840774),h=n(897213),f=n(182804),m=n(376852),v=n(619143),g=n(961540);function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var C=1,S=2,T=-1,A={initHandlers(){(0,f.tq)().setInteractiveHandler("MoneyTransfer/receive_method_change",(e=>{var t=e.payload.event.target;if(!hasClass(t,"disabled")){var n=e.payload.dataAttrs,r=n.value,o=n.name;A.onReceiveMethodChange(t,r,o)}})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/in_chat_focus_amount",(()=>{(0,i.elfocus)("transfer_amount")})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/check_user_message",(()=>{A.checkUserMessage()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/show_hint",(e=>{(0,m.showHint)(e.payload.event.target)})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/send",(e=>{A.send(Boolean(e.payload.dataAttrs.newWindow))})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/check_participate",(e=>{(0,r.checkbox)(e.payload.event.target),A.checkRequestParticipate()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/check",(e=>{(0,r.checkbox)(e.payload.event.target)})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/check_auto_accept",(e=>{(0,r.checkbox)(e.payload.event.target),A.checkAutoAccept()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/about",(e=>{A.aboutBox(e.payload.dataAttrs.aboutKey)})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/history",(()=>{A.historyBox()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/hide_pin_box",(()=>{A.hidePinBox()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/check_vk_pay_offer",(()=>{A.checkVkPayOfferBox()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/clean_amount",(e=>{A.cleanAmount(e.payload.event.target,e.payload.event,Boolean(e.payload.dataAttrs.onlyClean))})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/send_amount_on_enter",(e=>{13===e.payload.event.keyCode&&A.send(),A.autosizeAmount()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/focus_from_to",(e=>{(0,i.elfocus)(e.payload.event,0,1e4)})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/focus_and_hide_link",(e=>{(0,i.elfocus)(e.payload.event,0,1e4),A.hideLinkCopied()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/copy_link",(e=>{A.copyLinkToClipboard(ge(e.payload.dataAttrs.element))})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/share_qr",(()=>{A.shareQRCode()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/download_qr",(()=>{A.downloadQRCode()})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/switch_to_transfer_box",(e=>{A.switchBoxSection(e.payload.event.target,"transfer")})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/switch_to_request_box",(e=>{A.switchBoxSection(e.payload.event.target,"request")})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/switch_to_link_box",(e=>{A.switchBoxSection(e.payload.event.target,"link")})),(0,f.tq)().setInteractiveHandler("MoneyTransfer/init_accept",(()=>{A.initAccept(cur.paymentsOptions.chkData,cur.paymentsOptions.frame,!0)}))},init(){this.initHandlers();var e=curBox();if(ge("payments_box")!=geByClass1("payments_money_transfer_box",e.bodyNode)&&_message_boxes.length>1){var t=!0;_message_boxes.forEach((function(e,n){t&&ge("payments_box")==geByClass1("payments_money_transfer_box",e.bodyNode)&&(boxLayer.removeChild(gpeByClass("popup_box_container",e.bodyNode)),boxQueue._boxes.splice(n,1),delete _message_boxes[n],t=!1)}))}if(cur.moneyLinksTooltip&&(cur.moneyLinksTooltip.destroy(),delete cur.moneyLinksTooltip),e.setOptions({grey:!0}),cur.paymentsOptions.requestId&&!cur.paymentsOptions.vkpayAvailable&&(e.changed=!0,e.setOptions({width:510}),A.send()),placeholderInit("transfer_amount"),placeholderInit("transfer_comment"),cur.paymentsOptions.isChat){if(placeholderInit("transfer_chunk_amount"),cur.autoacceptCardDD=new InlineDropdown("transfer_autoaccept_card",{items:cur.paymentsOptions.cards,selected:cur.paymentsOptions.cardSeleceted,withArrow:!0,onShow:A.enableAutoaccept,onSelect:e=>{-1==e?A.sendBind():cur.paymentsOptions.vkpayAvailable&&A.checkAmount(val("transfer_amount"))}}),cur.autoacceptCardEl=ge("transfer_autoaccept_card"),(0,i.toggleClass)("transfer_autoaccept_card","disabled",!cur.paymentsOptions.autoAcceptEnabled),cur.paymentsOptions.autoAcceptEnabled&&(0,r.checkbox)("transfer_autoaccept",!0),cur.paymentsOptions.cards.length<2){var n=(0,i.ce)("a",{id:"payments_money_transfer_new_card_lnk",innerHTML:(0,d.getLang)("payments_money_transfer_new_card")});addEvent(n,"mousedown",A.sendBind),(0,i.hide)(cur.autoacceptCardEl),cur.autoacceptCardEl.parentNode.appendChild(n)}}else if(ge("transfer_to")){(0,i.hide)("payments_money_transfer_user");var o="transfer"===cur.paymentsOptions.boxTab;cur.uiTransferTo=new Dropdown(ge("transfer_to"),cur.paymentsOptions.friends.filter((function(e){return o||!0===e[7]})),{big:!0,introText:(0,d.getLang)("votes_transfer_start_typing_recipient"),noResult:"",placeholder:(0,d.getLang)("votes_transfer_choose_recipients"),placeholderColored:!0,multiselect:!1,enableCustom:!0,autocomplete:!0,imageId:"transfer_to_photo",indexkeys:[1,4],noImageSrc:"/images/blank.gif",onChange:e=>{if(e&&-1!=e){var t=cur.uiTransferTo.val_full();cur.paymentsOptions.toId=t[0],cur.paymentsOptions.hash=t[5],val("payments_money_transfer_summary",t[6]),setTimeout(i.elfocus.pbind("transfer_amount"),100),cur.paymentsOptions.vkpayAvailable&&A.updateMethods()}}})}else ge("transfer_method")&&A.initMethods();setTimeout(i.elfocus.pbind("transfer_amount"),100),shortCurrency(),"link"===cur.paymentsOptions.boxTab&&A.genQRCode();var a=val("transfer_amount");a&&A.checkAmount(a,!1,!0),A.autosizeAmount(),A.showMoneyLinksTooltip(),cur.transferPageLoaded=!1,cur.destroy.push(A.destroy)},destroy(){A.stopCheckFrameLoad(),cur.uiTransferTo&&cur.uiTransferTo.destroy(cur.uiTransferTo),cur.qrFrame&&(0,i.re)(cur.qrFrame)},initMethods(){cur.paymentsOptions.onlyCards=!(0,i.isVisible)("payments_money_transfer_receive_methods");var e=cur.paymentsOptions.cardSelected;if([S,C].includes(parseInt(cur.paymentsOptions.forceType))){var t,n=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=w(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}(cur.paymentsOptions.cards);try{for(n.s();!(t=n.n()).done;){E(t.value,1)[0]===T&&(e=T)}}catch(e){n.e(e)}finally{n.f()}}(cur.uiTransferCard=new Dropdown(ge("transfer_method"),cur.paymentsOptions.cards,{big:!0,selectedItems:e,onChange:(e,t)=>{if(-2===parseInt(e)){var n=(0,i.se)(t);return nav.go(n.getAttribute("data-url")),(0,r.lockButton)("payments_money_transfer_send"),!1}A.updateTransferType(),A.updateCardFee(!0),val("transfer_amount")||setTimeout(i.elfocus.pbind("transfer_amount"),100)}}),cur.paymentsOptions.onlyCards)||geByClass1("payments_money_transfer_receive_options","payments_money_transfer_receive_methods")&&(window.radioBtns.receiveOptions={els:Array.prototype.slice.apply((0,i.geByClass)("radiobtn")),val:e==T?"vkpay":"cards"});if(void 0!==cur.paymentsOptions.vkpayBalance&&((0,c.each)((0,i.geByClass)("_code","payments_money_transfer_code_wrap"),(function(){addEvent(this,"mousedown",A.onPinClick),addEvent(this,"keyup",A.onPinKeyUp),addEvent(this,"keypress",A.onPinEnter)})),A.isVKPayFillUpEnabled())){var o=A.getBindCards();o.length>0&&(cur.uiFillUpCard=new Dropdown(ge("fill_up_card"),o,{big:!0,selectedItems:cur.paymentsOptions.fillUpCardSelected}))}var a=!cur.paymentsOptions.transferType||cur.paymentsOptions.forceType;a&&A.updateTransferType(),A.updateCardFee(!a)},updateLocalStorageNewWindowSign(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()+20+20*Math.random());return localStorage.setItem("money_transfer_new_window",t.getTime()),t},getLocalStorageNewWindowSign(){var e,t=parseInt(null!==(e=localStorage.getItem("money_transfer_new_window"))&&void 0!==e?e:0);if(1===t)t=A.updateLocalStorageNewWindowSign().getTime();else if(0===t)return!1;return t>(new Date).getTime()},updateMethods(){var e,t=cur.paymentsOptions.toId;if(t&&cur.paymentsOptions.vkpayAvailable){var n=ge("payments_money_transfer_send");val("payments_box_error",""),cur.moneyTranferMethodsReq&&(cur.moneyTranferMethodsReq.abort(),cur.moneyTranferMethodsReq=null),"request"!==(null===(e=cur.paymentsOptions)||void 0===e?void 0:e.boxTab)&&(cur.moneyTranferMethodsReq=ajax.post("al_payments.php?act=a_get_money_transfer_methods",{to_id:t},{onDone:(e,t)=>{(0,r.unlockButton)(n),val("payments_money_transfer_methods",e),cur.paymentsOptions=extend(cur.paymentsOptions,t),cur.paymentsOptions.transferType=t.transferType,A.initMethods()},onFail:e=>(e&&isString(e)&&((0,r.unlockButton)(n),A.showError(e)),!0),showProgress:r.lockButton.pbind(n)}))}},send(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=curBox(),o=ge("payments_money_transfer_send");if(!(0,r.isButtonLocked)(o))if(cur.paymentsOptions.toId||!cur.uiTransferTo){var a=0;if(A.resetTransferWindow(),!(0,i.isVisible)("payments_money_transfer_no_amount_wrap")){if(!(a=val("transfer_amount"))||a<=0)return(0,i.addClass)("payments_money_transfer_amount_wrap","money_error"),setTimeout(i.removeClass.pbind("payments_money_transfer_amount_wrap","money_error"),500),void(0,i.elfocus)("transfer_amount");if(!A.checkAmount(a,!0))return;if((0,r.isChecked)("transfer_participate"))a-=A.getChunkAmount(a,!0)}if(A.hideMoneyLinksTooltip(),cur.paymentsOptions.onSendStart&&cur.paymentsOptions.onSendStart(),"request"!==cur.paymentsOptions.boxTab){A.createFrame();var s={act:"a_init_money_transfer",to_id:cur.paymentsOptions.toId,owner_id:cur.paymentsOptions.ownerId,amount:a,currency:cur.paymentsOptions.currency,comment:val("transfer_comment"),from:cur.paymentsOptions.from,hash:cur.paymentsOptions.hash,accept_vk_pay_offer:cur.paymentsOptions.shouldAcceptVkPayOffer};if(cur.paymentsOptions.vkpayAvailable&&(s.card_id=cur.uiTransferCard.val(),cur.paymentsOptions.onlyCards||(s.receive_method=radioval("receiveOptions")),"-1"===s.card_id)){if(!t)return void A.showPinBox();s.vkpay_pin=t}if(A.isVKPayTransfer()&&A.isVKPayFillUpEnabled()&&A.isFillUpCardSelectionVisible()&&(s.fill_up_card_id=cur.uiFillUpCard.val()),cur.paymentsOptions.requestId&&(s.request_id=cur.paymentsOptions.requestId),cur.paymentsOptions.statSessionId&&(s.stat_session_id=cur.paymentsOptions.statSessionId),val("payments_box_error",""),e||!localStorage||this.isVKPayTransfer()||"-1"===s.card_id||(e=A.getLocalStorageNewWindowSign()),e){cur.paymentsOptions.qid&&(s.act="a_continue_money_transfer",s.qid=cur.paymentsOptions.qid),cur.transferWindow=window.open("","Money Transfer");var c=p.PaymentsBox.popupHtml((0,d.getLang)("payments_cards_redirect"),"","");cur.transferWindow.document.write(c)}ajax.post("al_payments.php",s,{onDone:(t,o)=>{var a;o?(cur.paymentsOptions.qid=t.qid,e?cur.transferWindow?A.updateTransferWindow(o):A.showError((0,d.getLang)("payments_payment_cancelled"),"info_msg"):(cur._popup_text=o,cur._popup_callback=function(){(0,i.hide)("payments_money_transfer_wrap","payments_money_transfer_buttons","payments_box_error","payments_money_transfer_prg","payments_iframe_cookie_disabled_div"),show("payments_money_transfer_iframe","payments_iframe_container"),cur.uiTransferTo&&((0,i.hide)("payments_money_transfer_user_select"),show("payments_money_transfer_user")),ge("payments_iframe_container").scrollTop=0,window.addEventListener("message",A.frameMessage,!1),n.changed=!0,n.setOptions({width:510}),!cur.paymentsOptions.requestId&&(0,i.isVisible)(n.titleWrap)&&n.setBackTitle(A.resetSendBox),setStyle(a,{width:ge("payments_iframe_container").parentNode.offsetWidth-(0,r.sbWidth)()+"px"})},(a=ge("transfer_iframe")).contentWindow.document.open("text/html","replace"),a.contentWindow.document.write(o),a.contentWindow.document.close(),cur._popup_callback(),A.startCheckFrameLoad(+new Date))):(cur.paymentsOptions.receiptRedesign&&window.addEventListener("message",A.frameMessage,!1),(0,i.hide)("payments_money_transfer_wrap","payments_money_transfer_buttons","payments_box_error","payments_iframe_container",geByClass1("payments_money_transfer_mc_info_msg","payments_money_transfer_iframe")),cur.uiTransferTo&&((0,i.hide)("payments_money_transfer_user_select"),show("payments_money_transfer_user")),show("payments_money_transfer_iframe","payments_money_transfer_prg"));A.startCheckStatus(t,e)},onFail:e=>(A.resetTransferWindow(),A.showError(e),!0),showProgress:r.lockButton.pbind(o),hideProgress:r.unlockButton.pbind(o)})}else A.sendRequest(a)}else(0,r.notaBene)(cur.uiTransferTo.container)},sendRequest(e){var t=ge("payments_money_transfer_send"),n={to_id:cur.paymentsOptions.toId,owner_id:cur.paymentsOptions.ownerId,amount:e,currency:cur.paymentsOptions.currency,comment:val("transfer_comment"),from:cur.paymentsOptions.from,hash:cur.paymentsOptions.hash};if(cur.paymentsOptions.statSessionId&&(n.stat_session_id=cur.paymentsOptions.statSessionId),cur.paymentsOptions.isChat){if(n.total_amount=parseInt(e),n.amount=parseInt(val("transfer_chunk_amount")),n.pin_message=(0,r.isChecked)("transfer_pin_message")?1:0,(0,r.isChecked)("transfer_autoaccept")&&(cur.autoacceptCardDD&&(n.accept_card=cur.autoacceptCardDD.val()),!n.accept_card||-1==n.accept_card))return A.showError((0,d.getLang)("payments_money_request_error_no_accept_card")),!1;var o=!1,i=A.getTransferLimit("minAmount"),a=A.getTransferLimit("maxAmount");if(i&&n.amount<i?o=(0,d.getLang)("payments_money_request_error_min_chunk_amount_currency"):a&&n.amount>a?o=(0,d.getLang)("payments_money_request_error_max_chunk_amount_currency"):n.total_amount&&n.amount>n.total_amount&&(o=(0,d.getLang)("payments_money_request_error_chunk_amount_too_big")),o)return A.showError(o),(0,r.notaBene)("transfer_chunk_amount"),!1}val("payments_box_error",""),ajax.post("al_payments.php?act=a_send_money_request",n,{onDone:e=>{curBox().hide(),showDoneBox(e,{out:6e3})},onFail:e=>(A.showError(e),!0),showProgress:r.lockButton.pbind(t),hideProgress:r.unlockButton.pbind(t)})},sendBind(){var e=curBox();A.createFrame(),(0,i.hide)("payments_money_transfer_wrap","payments_money_transfer_buttons","payments_box_error","payments_money_transfer_summary_wrap","payments_iframe_container",geByClass1("msg","payments_money_transfer_iframe"),geByClass1("tb_tabs_wrap",e.bodyNode)),show("payments_money_transfer_iframe","payments_money_transfer_prg"),e.setBackTitle(A.resetSendBox),e.setOptions({width:510});var t={type:"card",only_auth:1,hash:cur.paymentsOptions.bindHash};val("payments_box_error",""),ajax.post("al_payments.php?act=a_getvotes_charge",t,{onDone:(t,n)=>{var o;cur._popup_text=n,cur._popup_callback=function(){(0,i.hide)("payments_money_transfer_prg"),show("payments_iframe_container"),ge("payments_iframe_container").scrollTop=0,window.addEventListener("message",A.frameMessage,!1),cur.autoacceptCardDD&&(0,i.isVisible)(cur.autoacceptCardEl)&&cur.autoacceptCardDD.select(cur.paymentsOptions.cards[0][0]),e.changed=!0,setStyle(o,{width:ge("payments_iframe_container").parentNode.offsetWidth-(0,r.sbWidth)()+"px"})},(o=ge("transfer_iframe")).contentWindow.document.open("text/html","replace"),o.contentWindow.document.write(n),o.contentWindow.document.close(),cur._popup_callback(),cur.isPaymentCanceled=cur.isPaymentFailed=!1,cur.moneyTranferCheckInt=setInterval((function(){A.checkBindStatus(t),(cur.isPaymentCanceled||cur.isPaymentFailed)&&(clearInterval(cur.moneyTranferCheckInt),cur.isPaymentFailed?A.showError((0,d.getLang)("payments_landing_cancelled")):A.showError((0,d.getLang)("payments_payment_cancelled"),"info_msg"))}),2e3)},onFail:e=>(A.showError(e),!0)})},createFrame(){var e=ge("payments_iframe_container"),t=(0,i.ce)("iframe",{id:"transfer_iframe",name:"transfer_iframe"},{border:0,height:"445px",width:510-(0,r.sbWidth)()+"px",overflowX:"hidden",overflowY:"hidden"});t.frameBorder=0,e.innerHTML="",e.appendChild(t)},popupWrite(e){if(e.document.innerHTML!==cur._popup_text){e.document.write(cur._popup_text),e.document.close();try{e.document.charset="windows-1251"}catch(e){}e.blur(),e.focus(),cur._popup_callback&&cur._popup_callback()}},resetSendBox(){var e=curBox();if(e){var t=geByClass1("tb_tabs_wrap",e.bodyNode);(0,i.hide)("payments_money_transfer_iframe"),show("payments_money_transfer_wrap","payments_money_transfer_buttons","payments_money_transfer_summary_wrap",t,geByClass1("payments_money_transfer_mc_info_msg","payments_money_transfer_iframe")),cur.uiTransferTo&&((0,i.hide)("payments_money_transfer_user"),show("payments_money_transfer_user_select")),t&&e.setOptions({title:""}),e.changed=!1,e.setOptions({width:510}),(0,i.isVisible)(e.titleWrap)&&e.setBackTitle(!1)}},resetTransferWindow(){cur.transferWindow&&(show("payments_money_transfer_wrap","payments_money_transfer_buttons"),(0,i.hide)("payments_money_transfer_prg","payments_money_transfer_iframe"),cur.transferWindow.location=window.location,cur.transferWindow.close()),cur.transferWindow=void 0},updateTransferWindow(e){var t=cur.transferWindow.document.getElementById("wait_text_container");t&&(t.innerHTML=""),cur.transferWindow.document.write(e),setTimeout((()=>{var e;null===(e=cur.transferWindow.document.getElementById("popup_payment_form"))||void 0===e||e.submit()}),1500),window.addEventListener("message",A.frameMessage,!1),(0,i.hide)("payments_money_transfer_wrap","payments_money_transfer_buttons","payments_box_error","payments_iframe_safari_trouble_div","payments_iframe_container"),val("payments_transfer_box_progress_msg",(0,d.getLang)("payments_waiting_transfer_complete")),show("payments_money_transfer_iframe","payments_money_transfer_prg")},startCheckStatus(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];cur.isPaymentCanceled=cur.isPaymentFailed=!1,cur.moneyTransferRedirected=!1,cur.moneyTranferCheckInt&&clearInterval(cur.moneyTranferCheckInt),cur.moneyTranferCheckInt=setInterval((function(){if(A.checkStatus(e,t),cur.isPaymentCanceled||cur.isPaymentFailed){var n=A.resetTransferWindow();if(n&&n(),clearInterval(cur.moneyTranferCheckInt),e.accept)return void curBox().hide();cur.isPaymentFailed?A.showError((0,d.getLang)("payments_landing_cancelled")):A.showError((0,d.getLang)("payments_payment_cancelled"),"info_msg")}}),2e3)},hideBoxQueue(){for(;boxQueue.count();)boxQueue.hideLast(!1)},stopListeningFrameMessages(){window.removeEventListener("message",A.frameMessage,!1)},checkStatus(e,t){var n={act:"a_check_money_transfer",qid:e.qid,hash:e.hash};e.accept&&(n.accept=e.accept),ajax.post("al_payments.php",n,{onDone:(n,a,s,c)=>{if(!n||4==n&&cur.moneyTransferRedirected){var l;t&&(null===(l=cur.transferWindow)||void 0===l?void 0:l.closed)&&(A.showError((0,d.getLang)("payments_payment_cancelled")),A.stopListeningFrameMessages(),A.resetTransferWindow(),cur.isPaymentFailed=!1,cur.isPaymentCanceled=!1)}else{if(1==n||3==n){if(t)0===cur.paymentsOptions.transferType||cur.paymentsOptions.transferType===C?cur.transferWindow&&!cur.transferWindow.closed&&(A.resetTransferWindow(),A.hideBoxQueue()):(A.resetTransferWindow(),A.hideBoxQueue());else cur.paymentsOptions.transferType===S?(A.resetTransferWindow(),A.hideBoxQueue()):cur.paymentsOptions.receiptRedesign&&((0,i.hide)(document.querySelector(".payments_money_transfer_footer")),(null==c?void 0:c.receipt_link)&&A.setIframeByLink(c.receipt_link));c||showDoneBox(a,{out:6e3});var u=nav.objLoc;e.accept||"settings"!==u[0]||"payments"!==u.act||"transfer"!==u.section||(cur.historyOffset||(cur.historyOffset={}),cur.historyOffset.transfer=0,(0,v.showNextPaymentsHistory)(!1,u.section)),3==n&&(c&&c.title&&(0,o.showFastBox)({title:c.title},a,(0,d.getLang)("payments_remember_card_btn"),A.rememberAcceptCard.pbind(c),(0,d.getLang)("payments_dont_remember_card_btn")),TopNotifier.invalidate(),cur.acceptMoneyBtn&&hasClass((0,i.domPN)(cur.acceptMoneyBtn),"feedback_buttons")?((0,i.re)((0,i.domPN)(cur.acceptMoneyBtn)),cur.acceptMoneyBtn=!1):cur.acceptMoneyBtn&&((0,i.re)(geByClass1("_decline_btn",(0,i.domPN)(cur.acceptMoneyBtn))),domReplaceEl(cur.acceptMoneyBtn,s),cur.acceptMoneyBtn=!1))}else if(2==n||5==n)A.showError(a),A.stopListeningFrameMessages(),cur.isPaymentFailed=!1,cur.isPaymentCanceled=!1;else{if(4==n){var _;if(cur.moneyTransferRedirected=!0,cur._popup_text=s,t&&cur.transferWindow)A.updateTransferWindow(s);else cur._popup_callback=function(){(0,i.hide)("payments_money_transfer_prg"),show("payments_iframe_container"),ge("payments_iframe_container").scrollTop=0,window.addEventListener("message",A.frameMessage,!1),curBox().changed=!0,setStyle(_,{width:ge("payments_iframe_container").parentNode.offsetWidth-(0,r.sbWidth)()+"px"})},(_=ge("transfer_iframe")).contentWindow.document.open("text/html","replace"),_.contentWindow.document.write(s),_.contentWindow.document.close(),cur._popup_callback();return}if(6==n)return void((0,i.isVisible)("payments_money_transfer_prg")||((0,i.hide)("payments_iframe_container"),show("payments_money_transfer_iframe","payments_money_transfer_prg")))}clearInterval(cur.moneyTranferCheckInt)}},onFail:e=>(clearInterval(cur.moneyTranferCheckInt),A.resetTransferWindow()(),A.showError(e),!0)})},checkBindStatus(e){var t={act:"a_getvotes_check",type:"card"};e&&(e.oid||e.qid)&&(t.oid=e.oid,t.qid=e.qid,t.hash=e.hash),ajax.post("al_payments.php",t,{onDone:(e,t,n)=>{e&&(1==e?(A.resetSendBox(),A.enableAutoaccept(),n&&cur.autoacceptCardDD&&((0,i.isVisible)(cur.autoacceptCardEl)||((0,i.hide)(geByTag("A",cur.autoacceptCardEl.parentNode)[0]),show(cur.autoacceptCardEl)),cur.paymentsOptions.cards.unshift([n.bindingId,n.bin]),cur.autoacceptCardDD.setItems(cur.paymentsOptions.cards),cur.autoacceptCardDD.select(n.bindingId))):2!=e&&10!=e||A.showError(t),clearInterval(cur.moneyTranferCheckInt))},onFail:e=>(clearInterval(cur.moneyTranferCheckInt),A.showError(e),!0)})},paymentCanceled(e){e?cur.isPaymentFailed=!0:cur.isPaymentCanceled=!0,A.frameHeight()},frameHeight(e,t){var n=ge("transfer_iframe");e?(e=Math.max(e,250),cur.prevFrameHeight=n.style.height,n.style.height=e+"px"):(n.style.height=cur.prevFrameHeight,(0,i.removeClass)("payments_iframe_container","payments_threeds_frame")),t||(ge("payments_iframe_container").style.height=(e||cur.prevFrameHeight)+15+"px"),ge("payments_iframe_container").scrollTop=0},frameMessage(e){var t;if(curBox()||!cur.paymentsOptions.receiptRedesign){if(!(e.origin.match(/^https?:\/\/([a-zA-Z0-9\-.]+\.)?money\.mail\.ru$/)||e.origin.match(new RegExp(`^https?:\\/\\/([a-zA-Z0-9\\-.]+\\.)?${g.VK_SITE_REGEX_SOURCE_UNSAFE}$`))&&(null===(t=cur.paymentsOptions)||void 0===t?void 0:t.receiptRedesign)))return!1;var n={};if(!e.data||"{"!==e.data.substr(0,1)||"billing"===(n=(0,s.parseJSON)(e.data)).type){vk.dev&&(0,l.debugLog)(n);var r=geByClass1("payments_iframe_container",curBox().bodyNode)||ge("payments_iframe_container");if(cur.transferPageLoaded=!0,"resizeFrame"===n.action?setTimeout(A.frameHeight.pbind(n.action_params.height),200):"submit"===e.data||"3dsPage"===n.action?(setTimeout(A.frameHeight.pbind(600,!0),200),(0,i.addClass)(r,"payments_threeds_frame")):"3dsFinish"===n.action?(A.frameHeight(),(0,i.removeClass)(r,"payments_threeds_frame")):"session_fail"===n.action?((0,i.hide)(r),A.resetTransferWindow(),show("payments_iframe_safari_trouble_div"),A.updateLocalStorageNewWindowSign()):"putPixel"===n.action&&"page_load"===n.action_params.alias?(p.PaymentsBox.finishFormMeasure("dmr_transfer"),(0,u.statlogsValueEvent)("money_transfers",0,"iframe_loaded")):"paySuccess"===n.action&&setTimeout(A.frameHeight.pbind(500),300),cur.paymentsOptions.receiptRedesign){if("make_one_more_transfer"===n.action||"close_window"===n.action)switch(clearInterval(cur.moneyTranferCheckInt),A.resetTransferWindow(),A.stopListeningFrameMessages(),n.action){case"make_one_more_transfer":A.resetSendBox();break;case"close_window":A.hideBoxQueue()}if("get_transfer_source"===n.action){var o=vk.dev?"*":window.location.origin;cur.transferWindow&&cur.transferWindow.postMessage(JSON.stringify({from:cur.paymentsOptions.from}),o);var a=ge("transfer_iframe");a&&a.contentWindow.postMessage(JSON.stringify({action:"set_transfer_source",source:cur.paymentsOptions.from}),o)}}}}else A.stopListeningFrameMessages()},setIframeByLink(e){var t=geByClass1("payments_iframe_container",curBox().bodyNode)||ge("payments_iframe_container"),n=(0,i.ce)("iframe",{id:"transfer_iframe",name:"transfer_iframe"},{border:0,height:"445px",width:"510px",overflowX:"hidden",overflowY:"hidden"});n.frameBorder=0,t.innerHTML="",t.appendChild(n),(0,i.hide)(ge("payments_money_transfer_prg")),show(t),n.src=e},startCheckFrameLoad(e){cur.frameLoadChecker=setInterval((function(){cur.transferPageLoaded?A.stopCheckFrameLoad():+new Date-e>5e3&&(A.stopCheckFrameLoad(),A.resetTransferWindow(),(0,i.hide)("payments_iframe_container"),show("payments_iframe_safari_trouble_div"),A.updateLocalStorageNewWindowSign())}),1e3)},stopCheckFrameLoad(){clearInterval(cur.frameLoadChecker)},initAccept(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n)cur.transferWindow=window.open("/","Money transfer"),cur.transferWindow.document.write(t),(0,i.hide)("payments_box_error","payments_iframe_container","payments_iframe_safari_trouble_div","payments_iframe_container"),val("payments_transfer_box_progress_msg",(0,d.getLang)("payments_waiting_transfer_complete")),show("payments_money_transfer_iframe","payments_money_transfer_prg");else{var r=geByClass1("payments_iframe_container",curBox().bodyNode)||ge("payments_iframe_container");show(r);var o=(0,i.ce)("iframe",{id:"transfer_iframe",name:"transfer_iframe"},{border:0,height:"445px",width:"510px",overflowX:"hidden",overflowY:"hidden"});o.frameBorder=0,r.innerHTML="",r.appendChild(o),o.contentWindow.document.open("text/html","replace"),o.contentWindow.document.write(t),o.contentWindow.document.close(),A.startCheckFrameLoad(+new Date)}window.addEventListener("message",A.frameMessage,!1),A.startCheckStatus(e,n)},rememberAcceptCard(e){var t=curBox()||{},n=t.btns.ok[0];ajax.post("al_payments.php?act=a_remember_money_transfer_accept_card",{card_id:e.card_id,hash:e.hash},{onDone:t.hide,showProgress:r.lockButton.pbind(n),hideProgress:r.unlockButton.pbind(n)})},cleanAmount(e,t,n){if(13!==t.keyCode){var r=e.value.replace(/[^0-9]/g,"");r=r.replace(/^0+/,""),e.value!=r&&(e.value=r),n||(A.checkAmount(r),A.autosizeAmount(),cur.paymentsOptions.cardsFee&&A.updateCardFee(!0))}},getTransferLimit(e){var t="request"===cur.paymentsOptions.boxTab?0:cur.paymentsOptions.transferType;return"balance"===e&&parseInt(t)===S?cur.paymentsOptions.vkpayBalance:(cur.paymentsOptions.isChat&&"request"===cur.paymentsOptions.boxTab&&"maxAmount"===e&&cur.autoacceptCardDD&&-2===cur.autoacceptCardDD.val()&&(t=2),cur.paymentsOptions.limits[t][e])},checkAmount(e,t,n){var a,s=!1,c=hasClass("payments_money_transfer_amount_wrap","money_error"),l=parseInt(null===(a=cur.uiTransferCard)||void 0===a?void 0:a.val())===T,u=A.isVKPayTransfer(),_=A.isVKPayFillUpEnabled();if(t&&c)return u&&e>A.getTransferLimit("balance")&&!_&&(0,o.showFastBox)({title:(0,d.getLang)("payments_vkpay_low_balance_title"),width:420},(0,d.getLang)("payments_vkpay_low_balance_text"),(0,d.getLang)("payments_vkpay_topup_button"),nav.go.pbind("/vkpay#action=refill"),(0,d.getLang)("global_close")),!1;var p=cur.paymentsOptions.isChat&&"request"===cur.paymentsOptions.boxTab,h=p&&(0,r.isChecked)("transfer_participate"),f=A.getTransferLimit("minAmount")*(h?2:1),m=A.getTransferLimit("maxAmount"),v=A.getTransferLimit("balance"),g=langNumeric(f,cur.paymentsOptions.currencyStr,!0),y=(0,d.getLang)("payments_money_transfer_amount_limits").replace("{min_amount}",g),E=!p;if(p&&cur.autoacceptCardDD&&-2===cur.autoacceptCardDD.val()&&(E=!0),l&&u&&_&&!(void 0!==v&&e<=v)||A.hideFillUpCardSelection(),t&&f&&e<f)s=(0,d.getLang)("payments_money_transfer_error_min_amount_currency").replace("{min_amount}",g);else if(m&&E&&e>m){var w=langNumeric(m,cur.paymentsOptions.currencyStr,!0);s=(0,d.getLang)("payments_money_transfer_error_max_amount_currency").replace("{max_amount}",w)}else if(l&&void 0!==v&&e>v){if(u&&_)A.getBindCards().length>0?A.showFillUpCardSelection():s=(0,d.getLang)("payments_money_transfer_low_balance");else s=(0,d.getLang)("payments_money_transfer_low_balance")}var b=ge("payments_money_transfer_notice");if(0!=s)return val(b,s),(0,i.addClass)("payments_money_transfer_amount_wrap","money_error"),!1;if((c||n||e<f)&&((e<f||"request"===cur.paymentsOptions.boxTab)&&val(b,y),(0,i.removeClass)("payments_money_transfer_amount_wrap","money_error")),!t&&p){var C=A.getChunkAmount(e,h);if(val("transfer_chunk_amount",C),f&&e<f)val(b,y);else{var S=langNumeric(h?e-C:e,cur.paymentsOptions.currencyStr,!0);val(b,(0,d.getLang)("payments_money_transfer_will_be_requested").replace("{amount}",S))}}return!0},getChunkAmount(e,t){var n=A.getTransferLimit("minAmount"),r=A.getTransferLimit("maxAmount"),o=Math.max(n||100,Math.ceil(e/Math.max(1,cur.paymentsOptions.chatCount-(t?0:1))));return r&&(o=Math.min(o,r)),o},autosizeAmount(){var e=ge("transfer_amount"),t=(0,i.ce)("span",{innerHTML:e.value||"0"},{fontFamily:getStyle(e,"fontFamily"),fontSize:getStyle(e,"fontSize"),fontWeight:getStyle(e,"fontWeight")});ge("utils").appendChild(t);var n=Math.floor(getSize(t)[0])+50;(0,i.re)(t),cur.amountMinSize||(cur.amountMinSize=80),n<cur.amountMinSize&&(n=cur.amountMinSize),setStyle(e,{width:n})},checkUserMessage(){checkTextLength(cur.paymentsOptions.maxTextLength,ge("transfer_comment"),ge("transfer_comment_limit_message"),!1,!0),(val("transfer_comment_limit_message")&&(0,i.isVisible)("transfer_comment_limit_message")?i.hide:show)("payments_money_transfer_fee_link")},checkRequestParticipate(){A.checkAmount(val("transfer_amount"))},checkRequestNoAmount(e,t){e&&uiTabs.switchTab(e),t?((0,i.hide)("payments_money_transfer_amount_wrap","transfer_participate"),show("payments_money_transfer_no_amount_wrap")):((0,i.hide)("payments_money_transfer_no_amount_wrap"),show("payments_money_transfer_amount_wrap","transfer_participate"),(0,i.elfocus)("transfer_amount"))},checkAutoAccept(){(0,i.toggleClass)("transfer_autoaccept_card","disabled",!(0,r.isChecked)("transfer_autoaccept"))},enableAutoaccept(){(0,r.isChecked)("transfer_autoaccept")||((0,r.checkbox)("transfer_autoaccept",!0),(0,i.removeClass)("transfer_autoaccept_card","disabled"))},showMoneyTransferBox(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return showBox("al_payments.php",y({},e,{act:"money_transfer_box"}),y({},t,{onDone(e,t){null==r||r(),cur.paymentsOptions=t,e.setOptions({width:510,bodyStyle:"padding: 0;",hideButtons:!0,onClean(){cur.moneyTranferCheckInt&&clearInterval(cur.moneyTranferCheckInt),nav.objLoc.z&&"moneysend"===nav.objLoc.z.substr(0,9)&&(delete nav.objLoc.z,nav.setLoc(nav.objLoc))}}),A.init()},onFail:n}))},aboutBox:e=>!(0,o.showFastBox)({title:(0,d.getLang)("payments_money_transfer_about_title"),width:560},(0,d.getLang)(e)),showError(e,t){e&&(ge("payments_box_error").innerHTML="",(0,a.showMsg)("payments_box_error",e,t||"error"),show("payments_box_error")),ge("payments_money_transfer_wrap")&&(A.resetSendBox(),cur.moneyTranferCheckInt&&(clearInterval(cur.moneyTranferCheckInt),cur.moneyTranferCheckInt=!1))},switchBoxSection(e,t){cur.paymentsOptions.boxTab!==t&&(e&&uiTabs.switchTab(e),"transfer"===cur.paymentsOptions.boxTab&&(0,i.isVisible)("payments_money_transfer_iframe")&&(A.resetSendBox(),cur.moneyTranferCheckInt&&(clearInterval(cur.moneyTranferCheckInt),cur.moneyTranferCheckInt=!1)),"transfer"===cur.paymentsOptions.boxTab&&cur.paymentsMoneyBoxTTHide&&cur.paymentsMoneyBoxTTHide(),"link"===cur.paymentsOptions.boxTab&&((0,i.hide)("payments_money_link_box"),show("payments_money_transfer_request_box"),A.hideMoneyLinksTooltip()),cur.paymentsOptions.boxTab=t,"link"===t?((0,i.hide)("payments_money_transfer_request_box"),show("payments_money_link_box"),A.hideMoneyLinksTooltip(),A.genQRCode(),A.showMoneyLinksTooltip()):(val("payments_money_transfer_summary",cur.paymentsOptions.boxSections[t].summary),val("payments_money_transfer_send",cur.paymentsOptions.boxSections[t].btn),val("payments_money_transfer_user_select_label",cur.paymentsOptions.boxSections[t].user_select_label),A.checkAmount(val("transfer_amount"),!1,!0),"transfer"===t&&A.updateCardFee(!0)),toggle("payments_money_transfer_nf_warning","transfer"===t),toggle("payments_money_transfer_methods","transfer"===t),toggle("payments_money_transfer_vk_pay_offer","transfer"===t),A.renderSelectBox(),setTimeout(i.elfocus.pbind("transfer_amount"),100))},genQRCode(){var e=ge("payments_money_transfer_qr");if(!e.childNodes.length){val(e,_.createQR(cur.paymentsOptions.transferLink,115,"qr-code",{isShowLogo:!0,isShowBackground:!1,foregroundColor:"var(--text_primary)",logoColor:"var(--accent)"}))}},shareQRCode(){A.hideMoneyLinksTooltip(!0),showBox("like.php",{act:"publish_box",object:"moneysend"+vk.id+"_0",list:""})},downloadQRCode(){if(!cur.paymentsOptions.qrUrl)return!1;var e=(0,i.ce)("iframe",{src:cur.paymentsOptions.qrUrl});return utilsNode.appendChild(e),cur.qrFrame&&(0,i.re)(cur.qrFrame),cur.qrFrame=e,!1},hideLinkCopied(){(0,c.each)((0,i.geByClass)("_link_copied","payments_money_link_box"),i.hide.pbind(this))},copyLinkToClipboard(e){A.hideLinkCopied(),A.hideMoneyLinksTooltip(!0),e.select(),document.execCommand("copy");var t=geByClass1("_link_copied",gpeByClass("_link_wrap",e));show(t)},renderSelectBox(){if(cur.uiTransferTo){var e="transfer"===cur.paymentsOptions.boxTab;cur.uiTransferTo.setData([]),cur.uiTransferTo.setOptions({autocomplete:!1}),cur.uiTransferTo.setData(cur.paymentsOptions.friends.filter((function(t){return e||!0===t[7]}))),cur.uiTransferTo.setOptions({autocomplete:!0}),cur.paymentsOptions.toId=null,cur.paymentsOptions.hash=null,cur.uiTransferTo.clear(),cur.uiTransferTo.deselectTokens(),val("payments_money_transfer_methods","")}},updateImHistory(e,t,n){var r=geByClass1("_money_transfer"+t,e);if(r){var o=geByClass1("_accept_btn",r);o&&((0,i.re)(geByClass1("_decline_btn",(0,i.domPN)(o))),domReplaceEl(o,n))}},initHistoryBox(e,t,n,o){var a=ge("ui_money_transfer_load_more");if(a){var s=ge("settings_transfer_history").tBodies[0];cur.userAutoScroll=new h.default(s,{offset:n,onNoMore:i.re.pbind(a),onNeedRows:(n,r)=>{var i={act:"money_transfer_history_box",offset:r,owner_id:e};t&&(i.request_id=t),o&&(i.hash=o),ajax.post("al_payments.php",i,{onDone:n})},drawRows:(e,t)=>{if(browser.msie){var n=(0,i.se)("<table>"+t+"</table>");for(var r in t=geByTag("tr",n))1==t[r].nodeType&&e.appendChild(t[r])}else e.insertAdjacentHTML("beforeEnd",t)},showProgress:r.lockButton.pbind(a),hideProgress:r.unlockButton.pbind(a),rowClass:"settings_history_row"})}},historyBox(){showBox("al_payments.php?act=money_transfer_history_box")},showMoneyLinksTooltip(){var e,t,n;cur.paymentsOptions.moneylinks_feature_tooltip&&!cur.moneyLinksTooltip&&((0,i.isVisible)("payments_money_link_box")?(e=geByClass1("payments_money_transfer_link_copy_btn","payments_money_link_box"),t=(0,d.getLang)("payments_money_link_btn_feature_text"),n={forceSide:"right",width:320,offset:[6,0]}):(e=geByClass1("ui_tab",geByClass1("_moneylink_tab","box_layer")))&&(t=(0,d.getLang)("payments_money_link_tab_feature_text"),n={forceSide:"bottom",width:250,offset:[0,4]}),e&&setTimeout((function(){cur.moneyLinksTooltip=new ElementTooltip(e,extend({content:'<div class="feature_tooltip__close" onclick="cur.moneyLinksTooltip.hide();"></div>'+t,cls:"feature_intro_tt feature_info_tooltip moneylinks_feature_tooltip",autoShow:!1,noHideOnClick:!0,noAutoHideOnWindowClick:!0,appendTo:geByClass1("ui_tabs","box_layer"),onHide:A.hideMoneyLinksTooltip.pbind(!0)},n)),cur.moneyLinksTooltip.show(),cur.destroy.push(A.hideMoneyLinksTooltip)}),500))},hideMoneyLinksTooltip(e){e&&ajax.post("al_index.php",{act:"hide_feature_tt",hash:cur.paymentsOptions.moneylinks_feature_tooltip_hash,type:"moneylinks"}),cur.moneyLinksTooltip&&(cur.moneyLinksTooltip.destroy(),delete cur.moneyLinksTooltip)},showPinBox(){(0,i.addClass)(curBox().bodyNode,"payments_box_code_showed"),show("payments_money_transfer_layer_bg","payments_money_transfer_code_box"),(0,c.each)((0,i.geByClass)("_code","payments_money_transfer_code_wrap"),(function(){val(this,"")})),(0,i.elfocus)("payments_code1"),curBox().changed=!0;var e=document.getElementById("payments_money_transfer_send");e&&(e.style.pointerEvents="none",setTimeout((()=>{e.style.pointerEvents="auto"}),0))},hidePinBox(){(0,i.hide)("payments_money_transfer_layer_bg","payments_money_transfer_code_box"),(0,i.removeClass)(curBox().bodyNode,"payments_box_code_showed"),curBox().changed=!1},checkVkPayOfferBox(){var e="payments_money_transfer_vk_pay_offer_box",t=!(0,r.isChecked)(e);(0,r.disableButton)("payments_money_transfer_send",!t),(0,r.checkbox)(e)},onPinKeyUp(e){var t=e.target;if(8==e.keyCode){var n=domPS(t);if(n){var r=n.getAttribute("data-index");val(n,""),cur.paymentsOptions.vkpcode[r]="",cur.paymentsOptions.vkpcode[r-1]="",(0,i.elfocus)(n)}}},onPinEnter(e){var t=e.target;if(!(e.keyCode>=47&&e.keyCode<=57))return cancelEvent(e);var n=t.getAttribute("data-index");cur.paymentsOptions.vkpcode||(cur.paymentsOptions.vkpcode=[]),cur.paymentsOptions.vkpcode[n-1]=e.key,val(t,String.fromCharCode(9679));var r=domNS(t);r?setTimeout(i.elfocus.pbind(r),10):setTimeout((function(){t.blur(),A.checkPin()}),10)},onPinClick(e){var t=e.target,n=domPS(t);if(n&&!val(n))return cancelEvent(e)},checkPin(){var e=cur.paymentsOptions.vkpcode.join("");delete cur.paymentsOptions.vkpcode,val("payments_money_transfer_code_error",""),ajax.post("al_payments.php?act=a_check_vkpay_pin",{code:e,hash:cur.paymentsOptions.pinHash},{onDone:t=>{if(1==t)return(0,i.hide)(geByClass1("_code_enter","payments_money_transfer_code_box")),void show(geByClass1("_code_recover","payments_money_transfer_code_box"));A.hidePinBox(),A.send(!1,e)},onFail:e=>(e&&val("payments_money_transfer_code_error",e),(0,c.each)((0,i.geByClass)("_code","payments_money_transfer_code_wrap"),(function(){val(this,""),(0,r.notaBene)(this)})),(0,i.elfocus)("payments_code1"),!0),showProgress:function(){(0,i.hide)("payments_money_transfer_code_wrap"),show("payments_money_transfer_spinner")},hideProgress:function(){(0,i.hide)("payments_money_transfer_spinner"),show("payments_money_transfer_code_wrap")}})},onReceiveMethodChange(e,t,n){(0,r.radiobtn)(e,t,n),A.updateTransferType(e),A.updateCardFee(!0)},updateTransferType(e){void 0!==cur.paymentsOptions.forceType?cur.paymentsOptions.transferType=cur.paymentsOptions.forceType:parseInt(cur.uiTransferCard.val())===T?cur.paymentsOptions.transferType=S:cur.paymentsOptions.onlyCards?cur.paymentsOptions.transferType=0:(void 0===e&&(0,c.each)(radioBtns.receiveOptions.els,(function(){hasClass(this,"on")&&(e=this)})),void 0!==e&&(cur.paymentsOptions.transferType=intval(attr(e,"data-type")))),A.checkAmount(val("transfer_amount"),!1,!0)},updateCardFee(e){if(cur.uiTransferCard&&"request"!==cur.paymentsOptions.boxTab){var t=intval(val("transfer_amount")),n=A.getTransferLimit("minAmount"),r=ge("payments_money_transfer_to_card"),o=cur.uiTransferCard.val(),a=cur.paymentsOptions.cardsFee[o],s=0===cur.paymentsOptions.transferType,c=parseInt(o)===T||cur.paymentsOptions.forceType===C||cur.paymentsOptions.forceType===S,l=parseInt(o)!==T&&!cur.paymentsOptions.receiverVkpay||0===cur.paymentsOptions.forceType,u=(0,d.getLang)("payments_transfer_without_fee"),_=(0,d.getLang)("payments_money_transfer_btn"),p=c?"payments_money_transfer_to_vkpay":"payments_money_transfer_to_card",h=l,f=0;if((0,i.toggleClass)(r,"disabled",c),(0,i.toggleClass)("payments_money_transfer_to_vkpay","disabled",l),0===parseInt(o))s&&(u=cur.paymentsOptions.mastercardPromoEnabled?(0,d.getLang)("payments_transfer_method_without_fee_for_mastercard"):(0,d.getLang)("payments_money_transfer_commission_undefined"));else if(parseInt(o)===T)h=!0;else if(s&&a&&(a.percent||a.vkPay&&a.vkPay.percent)){var m=a.free_amount_rest||0,v=a.free_amount_min||0;if(!m||t>m||v&&t<v){var g=t;t>m&&(g=t-m);var y=a.percent||0,E=a.min||0,w=a.add||0;(f=g*y)<E?f=E:f+=w,f=+(Math.round(f+"e+3")+"e-3"),f=+(Math.round(f+"e+2")+"e-2"),u=langNumeric(f,cur.paymentsOptions.cardsFeeStr,!0)}if(a.vkPay){var b=t+f,D=a.vkPay.percent||0,P=a.vkPay.min||0,O=a.vkPay.add||0,I=b*D;I<P?I=P:I+=O,f=+(Math.round(f+I+"e+2")+"e-2"),I=+(Math.round(I+"e+2")+"e-2"),u=langNumeric(f,cur.paymentsOptions.cardsFeeStr,!0),u+=langNumeric(I,cur.paymentsOptions.cardsFeeVkPayStr,!0)}}!p||e&&!h||ge(p).classList.contains("on")||ge(p).click(),t>=n&&!hasClass("payments_money_transfer_amount_wrap","money_error")&&(val("payments_money_transfer_notice",u),0===parseInt(o)&&s||(_=langNumeric(+(Math.round(t+f+"e+2")+"e-2"),cur.paymentsOptions.buttonAmountStr,!0))),val("payments_money_transfer_send",_)}},isVKPayFillUpEnabled:()=>1==cur.paymentsOptions.vkpayFillUpEnabled,isVKPayTransfer:()=>parseInt(cur.paymentsOptions.transferType)===S,getBindCards:()=>cur.paymentsOptions.cards.filter((e=>{var t=parseInt(e[0]);return 0!==t&&t!==T})),hideFillUpCardSelection(){(0,i.hide)("payments_money_transfer_fill_up_cards")},showFillUpCardSelection(){show("payments_money_transfer_fill_up_cards")},isFillUpCardSelectionVisible:()=>(0,i.isVisible)("payments_money_transfer_fill_up_cards")}},840774:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{PaymentsBox:()=>PaymentsBox});var core_js_modules_es6_regexp_to_string__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(66108),core_js_modules_es6_object_to_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(296253),core_js_modules_es6_regexp_match__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(21466),core_js_modules_es6_regexp_replace__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(59357),_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(315544),_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(486125),_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(386409),_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(695724),_web_lib_message_box__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(654612),_web_lib_tooltip_utils__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(376852),_web_lib_lang__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(786067),_shared_lib_browser__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(726271),_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(479957),_web_lib_feature_entries__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(850167),_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(787481),_web_lib_ui_util__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(159121),_web_lib_accessibility__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(376270),_web_lib_utils__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(982452),_web_payments_app_order_box__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(291587),_shared_evbus__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(182804),_icons_desktop_getIcon24BrowserBack__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(439026),_shared_lib_site__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(961540);class PaymentsBox{static initHandlers(){(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/ps_promo_banner_click",(e=>{(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments_ps_promo_banner_event","","votes_buypage","relocate"),PaymentsBox.getVotesAmounts(!1,"spasibo",e.payload.target)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/save_phone_prefix_click",(e=>{(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.elfocus)(geByTag1("input",e.payload.target.parentNode),0,0)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/save_phone_input",(e=>{13===e.payload.event.keyCode&&PaymentsBox.saveSmsPhone()})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/get_votes_amounts",(e=>{PaymentsBox.getVotesAmounts(!1,e.payload.dataAttrs.name,e.payload.target)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/phone_code_input",(e=>{13===e.payload.event.keyCode&&PaymentsBox.smsSendCode()})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/show_confirm_on_enter",(e=>{13===e.payload.event.keyCode&&PaymentsBox.showConfirm()})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/show_confirm",(()=>{PaymentsBox.showConfirm()})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/show_types",(()=>{PaymentsBox.showTypes()})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/show_terminal_tt",(e=>{PaymentsBox.paymentsShowTerminalTT(e.payload.target,e.payload.dataAttrs.name)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/show_phone_form",(()=>{PaymentsBox.showPhoneForm(2)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/show_phone_form_1",(()=>{PaymentsBox.showPhoneForm(1)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/show_all_prices",(e=>{PaymentsBox.showAllPrices(e.payload.target)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/change_option",(e=>{var t=e.payload.dataAttrs,n=t.index,r=t.name;PaymentsBox.onChangeOption(e.payload.target,n,r)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/focus_votes",(()=>{PaymentsBox.onChangeOption(geByClass1("last","payments_getvotes_amounts"),4,"payments_getvotes_amounts")})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/update_pay_amount",(e=>{PaymentsBox.updatePayAmount(e.payload.target)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/make_checkbox",(e=>{(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.checkbox)(e.payload.target)})),(0,_shared_evbus__WEBPACK_IMPORTED_MODULE_19__.tq)().setInteractiveHandler("PaymentsBox/toggle_email",(e=>{PaymentsBox.toggleEmail(e.payload.target)}))}static initialize(e){PaymentsBox.initHandlers(),window.curNotifier&&curNotifier.idle_manager&&curNotifier.idle_manager.started&&(isArray(cur.onUnidle)||(cur.onUnidle=[]),isArray(cur.onIdle)||(cur.onIdle=[]),cur.onUnidle.push((()=>{cur.getVotesDoneHide=!0})),cur.onIdle.push((()=>{cur.getVotesDoneHide=!1})));var t={bodyStyle:"padding: 0;",hideButtons:!0};if(cur.paymentsWideBox){var n={width:cur.checkoutEnabled?800:780,height:390};cur.checkoutEnabled||(n.title=!1),t=extend(t,n)}else t=extend(t,{width:480});if(e.setOptions(extend(t,{onClean:()=>{var t="sms"===cur.votesType&&(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_box_progress");for(var n in cur.smsChkStatInt&&clearInterval(cur.smsChkStatInt),cur.paymentsWaitingCache)cur.paymentsWaitingCache[n][2]&&clearInterval(cur.paymentsWaitingCache[n][2]);cur.smsAmountsInt&&clearTimeout(cur.smsAmountsInt),cur.isPaymentsAppOrder&&(cur.isPaymentComplete||cur.isPaymentAttemted)?e.onDone?e.onDone():(e.hide(),_web_payments_app_order_box__WEBPACK_IMPORTED_MODULE_18__.AppOrderBox.processOrder(1,e)):cur.isPaymentsAppOrder&&!cur.paymentsCheckOrderCnt&&cur.paymentsOrderBillPeriod&&cur.onSubscriptionCancel?cur.onSubscriptionCancel():cur.isPaymentsAppOrder&&!cur.paymentsCheckOrderCnt&&cur.onAppOrderCancel?cur.onAppOrderCancel():cur.paymentsTryCompleteOrder&&(cur.isPaymentComplete||cur.isPaymentAttemted)&&e.onDone&&e.onDone(),PaymentsBox.removeCheckOffersEvent(),window.removeEventListener("message",PaymentsBox.frameMessage,!1),window.removeEventListener("message",PaymentsBox.handlePaymentCompleteMessage,!1),t&&(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.showDoneBox)(getLang("payments_get_votes_box_close_notice"),{out:6e3})}})),(cur.fromInstantPay||cur.paymentsAuthPayment)&&(e.onDone=!1),cur.votesBox=e,cur.destroy.push((()=>{for(;boxQueue.count();)boxQueue.hideLast(!1)})),cur.checkoutEnabled)if(cur.paymentsWideBox){PaymentsBox.showProgress(""),PaymentsBox.submitDmrCheckout(cur.paymentsPreferVotes,!0);var r=ge("payments_wide_box_close_btn");r&&(r.onclick=cur.votesBox.hide)}else show("payments_getvotes_cont"),window.radioBtns.payments_getvotes_amounts={els:Array.prototype.slice.apply((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("radiobtn",ge("payments_getvotes_amounts")))},PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm);else cur.votesTypeInit&&(PaymentsBox.getVotesAmounts(!1,cur.votesTypeInit),cur.votesTypeInit=!1)}static initPhoneCountry(e,t){cur.countries=e,cur.defCountry=t,cur.uiPhoneCountry=new Dropdown(ge("phone_country"),cur.countries,{selectedItems:t,big:!0,autocomplete:!0,multiselect:!1,onChange:e=>{var t=ge("phone"),n=ge("payments_phone_prefix"),r=cur.uiPhoneCountry.val_full()[3];if(0===e||"0"===e||""===e||!1===e||void 0===e){var o=val(n);if(r==o)return;for(var i=0,a=cur.countries.length;i<a;++i)if(cur.countries[i][3]==o)return cur.uiPhoneCountry.val(cur.countries[i]);return cur.uiPhoneCountry.val(cur.defCountry,!0)}val(n,r),setTimeout(_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.elfocus.pbind(t),0)}}),cur.destroy.push(cur.uiPhoneCountry.destroy.bind(cur.uiPhoneCountry))}static initPhoneNumber(e){e&&["input","keydown","keyup","mousedown","mouseup","select","contextmenu","drop"].forEach((function(t){e.addEventListener(t,(e=>{var t=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.domClosestByTag)("input",e.target);t&&(t.value=t.value.replace(/\D/g,""))}))}))}static validateEmail(e){return e.length<64&&e.match(/^.{1,40}@.{1,40}$/)&&e.match(/^([a-z0-9_\-]{0,40}\.){0,10}[a-z0-9_\-*]{1,40}@(([a-z0-9][a-z0-9_\-]{0,40})?[a-z0-9]\.){1,6}[a-z]{2,7}$/i)}static getEmail(){var e=!1;if(cur.paymentsEmailCheckbox)if((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isChecked)(cur.paymentsEmailCheckbox)){if(!(e=(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_7__.trim)(val(cur.paymentsEmailInput))))return(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.notaBene)(cur.paymentsEmailInput),""}else e="false";return e}static toggleEmail(e){"INPUT"===e.tagName&&(e=geByClass1("checkbox",(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.domPN)(e)),(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isChecked)(e))||((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.checkbox)(e),(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isChecked)(e)&&(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.elfocus)(cur.paymentsEmailInput))}static unbind(e,t,n,r){if(!(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isButtonLocked)("payments_getvotes_submit")){var o=cur.paymentsPreferVotes;if(n){var i={act:"a_del_instant_method",type:e,prefer_votes:r?-1:o,hash:t};cur.isPaymentsAppOrder&&cur.paymentsOrderAppId&&(i.aid=cur.paymentsOrderAppId),ajax.post("al_payments.php",i,{onDone:PaymentsBox.getVotesAmountsOnDone,onFail:function(e){return PaymentsBox.showBoxError(e),!0},showProgress:()=>{cur.confirmBox?cur.confirmBox.showProgress():(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit")},hideProgress:()=>{cur.confirmBox?cur.confirmBox.hide():(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit")}})}else{var a="card"==e?getLang("payments_unbind_card_confirm"):getLang("payments_revoke_token_confirm");cur.confirmBox=(0,_web_lib_message_box__WEBPACK_IMPORTED_MODULE_8__.showFastBox)({title:getLang("global_action_confirmation"),dark:1,forceNoBtn:1,bodyStyle:"padding: 20px; line-height: 160%;"},a,getLang("payments_unbind_card_btn"),(()=>{PaymentsBox.unbind(e,t,!0)}),getLang("global_cancel"))}}}static instantPay(){if(!(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isButtonLocked)("payments_getvotes_submit")){var e=(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)();if(cur.isPaymentAttemted=!0,cur.paymentsAuthPayment)e.hide();else{var t,n,r;if(ge("payments_getvotes_amounts")&&(cur.votesAmountsVal=(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.radioval)("payments_getvotes_amounts")),void 0===cur.votesAmountsData[cur.votesAmountsVal]){var o=ge("votes_num")?parseInt(ge("votes_num").value,10):0;if(!(o>0))return;cur._otherVotes=o,t=cur._otherAmount,n=cur._otherAmount,r=cur.votesAmountCustomTimeHash}else t=cur.votesAmountsData[cur.votesAmountsVal][2],n=cur.votesAmountsData[cur.votesAmountsVal][3],r=cur.votesAmountsData[cur.votesAmountsVal][4];var i={act:"a_getvotes_charge",type:cur.votesType,instant_pay:1,amount:t,order_amount:n,hash:r};cur.statSessionId&&(i.stat_session_id=cur.statSessionId),cur.isPaymentsAppOrder&&cur.paymentsOrderId&&(i.order_id=cur.paymentsOrderId,i.order_app_id=cur.paymentsOrderAppId,i.order_bill_period=cur.paymentsOrderBillPeriod,i.order_hash=cur.paymentsOrderHash),PaymentsBox.disablePaymentTypesRows(),ajax.post("al_payments.php",i,{onDone:(e,t)=>{cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval((()=>{PaymentsBox.checkStatus(cur.votesType,e)}),2e3),PaymentsBox.showProgress&&PaymentsBox.showProgress()},onFail:e=>(PaymentsBox.showBoxError(e),!0),showProgress:_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton.pbind("payments_getvotes_submit"),hideProgress:_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton.pbind("payments_getvotes_submit")})}}}static showAllPrices(e){return each((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("radiobtn",ge("payments_getvotes_amounts")),((e,t)=>{show(t)})),(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.re)(e),!1}static paymentsShowTerminalTT(e,t){var n="";cur.paymentsTooltips[t]&&(n+=cur.paymentsTooltips[t]),n&&(0,_web_lib_tooltip_utils__WEBPACK_IMPORTED_MODULE_9__.showTooltip)(e,{text:n,dir:"auto",slide:15,className:"payments_terminal_tt",shift:[-3,3],hasover:1})}static updatePayAmount(o){var v=o.value.replace(/[^0-9]/g,""),i=(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_7__.intval)(parseInt(v,10));v=i<1e4?i:parseInt(i.toString().substr(0,4),10),o.value!=v&&(o.value=v);var amount=0;if(cur.votesAmountsData.calcPayAmount){-1==cur.votesAmountsData.calcPayAmount.indexOf("return")&&(cur.votesAmountsData.calcPayAmount="return "+cur.votesAmountsData.calcPayAmount);var calcFunc="(function(votes){"+cur.votesAmountsData.calcPayAmount+";})("+v+")";try{amount=eval(calcFunc)}catch(e){(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__.logEvalError)(e,calcFunc)}amount=amount?Math.ceil(100*amount)/100:0,amount=parseInt(amount,10)==amount?amount.toFixed(0):amount.toFixed(2),cur._otherAmount=amount,cur._otherVotes=v}var bonusElement=ge("payments_other_votes_bonus");if(bonusElement&&(cur.votesAmountsData.bonusesTable||cur.votesAmountsData.calcBonusVotes)){var bonus=0;if(cur.votesAmountsData.calcBonusVotes){var _calcFunc="(function(votes){"+cur.votesAmountsData.calcBonusVotes+";})("+v+")";try{bonus=eval(_calcFunc)}catch(e){(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__.logEvalError)(e,_calcFunc)}}else for(var j in cur.votesAmountsData.bonusesTable)if(v>=j){var _bonus=Math.floor(v*cur.votesAmountsData.bonusesTable[j]/j);_bonus>bonus&&(bonus=_bonus)}bonus?(bonusElement.innerHTML=getLang("payments_bonus_votes",bonus),show(bonusElement)):hide(bonusElement)}cur.votesAmountsData.currency_str?ge("votes_amount").innerHTML=amount>0?(0,_web_lib_lang__WEBPACK_IMPORTED_MODULE_10__.langNumeric)(amount,cur.votesAmountsData.currency_str):"":ge("votes_amount").innerHTML=amount>0?getLang("payments_votes_cost_in_rubles",amount):""}static onChangeOption(e,t,n){var r;if((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.radiobtn)(e,t,n),"payments_getvotes_amounts"===n){var o=cur.votesAmountsData[t];o?(cur.votesAmountsVal=t,r=getLang("payments_get_votes_for_X").replace("{amount}",o[1]),val("votes_num",""),val("votes_amount",""),cur.paymentsEmailCheckbox&&(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isChecked)(cur.paymentsEmailCheckbox)&&(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.elfocus)(cur.paymentsEmailInput)):(r=cur.payments_get_votes,(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.elfocus)("votes_num")),cur.checkoutEnabled?PaymentsBox.setButtons(r,PaymentsBox.showConfirm):PaymentsBox.setButtons(r,cur.votesAmountIsInstant||o&&o.length>=5?PaymentsBox.instantPay:PaymentsBox.showConfirm,cur.paymentsChangeType,PaymentsBox.showTypes)}}static setConfirmButtons(){if("card"!=cur.votesType&&cur.psList[cur.votesType]){var e=cur.paymentsWideBox?getLang("payments_back_to_ps_list"):getLang("payments_go_ps_list"),t=!cur.psList[cur.votesType].in_menu;cur.paymentsInstantPayType==cur.votesType?t?PaymentsBox.setButtons(getLang("payments_pay_order_btn"),PaymentsBox.instantPay,e,PaymentsBox.showPaySystemsList):PaymentsBox.setButtons(getLang("payments_pay_order_btn"),PaymentsBox.instantPay):t?PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm,e,PaymentsBox.showPaySystemsList):PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm)}else cur.checkoutEnabled?PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm):PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm,cur.paymentsChangeType,PaymentsBox.showTypes)}static popupWrite(e){return!(e.document.innerHTML==cur._popup_text||!cur._popup_text)&&(e.document.write(cur._popup_text),e.document.close(),e.blur(),e.focus(),cur._popup_callback&&cur._popup_callback(),!0)}static show3DsFrame(e,t){if(cur.threeds_submitted)return!0;cur.threeds_submitted=!0;var n=ge("payments_iframe_container"),r=ge("cards_iframe");r||((r=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.ce)("iframe",{id:"card_iframe",name:"card_iframe"},{border:0,height:"435px",width:n.parentNode.offsetWidth+"px",overflowX:"hidden",overflowY:"hidden"})).frameBorder=0,n.innerHTML="",n.appendChild(r));var o=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.ce)("form",{target:"card_iframe",method:"POST",action:e});for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&o.appendChild((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.ce)("input",{type:"hidden",name:i,value:t[i]}));n.appendChild(o),addClass("payments_iframe_container",cur.checkoutEnabled?"payments_threeds_checkout_frame":"payments_threeds_frame"),show("payments_iframe_container"),hide("payments_box_progress"),o.submit()}static submitDmrCheckout(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_box_progress")||t){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit");var n=cur.psList.dmr_checkout,r=!1,o=(e*n.vote_cost).toFixed(2);if(!e||e<=0?r=getLang("payments_web_no_sum"):n.min_amount&&e<n.min_amount?r=getLang("payments_min_amount_limit_votes").replace("%s",n.min_amount):n.max_amount&&e>n.max_amount?r=getLang("payments_max_amount_limit_votes").replace("%s",n.max_amount):void 0!==n.rest_amount_day&&e>n.rest_amount_day?r=getLang("payments_rest_amount_day_votes").replace("%s",n.rest_amount_day):void 0!==n.rest_amount_week&&e>n.rest_amount_week&&(r=getLang("payments_rest_amount_week_votes").replace("%s",n.rest_amount_week)),r)return PaymentsBox.showBoxError(r),!1;var i=PaymentsBox.getEmail();if(""===i)return(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),!1;if(i&&"false"!==i&&!PaymentsBox.validateEmail(i))return(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.notaBene)(cur.paymentsEmailInput),PaymentsBox.showBoxError(getLang("payments_error_invalid_email")),!1;removeClass("payments_iframe_container","payments_threeds_checkout_frame");var a=ge("payments_iframe_container"),s=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.ce)("iframe",{id:"card_iframe",name:"card_iframe"},{border:0,height:"435px",width:a.parentNode.offsetWidth+"px",overflowX:"hidden",overflowY:"hidden",display:"block",borderRadius:"0 0 4px 4px"});s.frameBorder=0,a.innerHTML="",a.style.height=s.style.height,a.appendChild(s),window.addEventListener("message",PaymentsBox.frameMessage,!1);var c=cur.votesType;!c&&cur.votesTypeInit&&(c=cur.votesTypeInit);var l={act:"a_getvotes_charge",type:"dmr_checkout",hash:cur.paymentsHash,amount:o,stat_session_id:cur.statSessionId,votes:e};c&&(l.pay_method=c),cur.paymentsAuthPayment&&(l.only_auth=1),i&&(l.email=i),cur.votesAmountsData.appoveCode&&(l.approve_code=cur.votesAmountsData.appoveCode),cur.isPaymentsAppOrder&&cur.paymentsOrderId&&(l.order_id=cur.paymentsOrderId,l.order_app_id=cur.paymentsOrderAppId,l.order_bill_period=cur.paymentsOrderBillPeriod,l.order_hash=cur.paymentsOrderHash),cur.votesAmountsData.purchaseDescr&&(l.purchase_descr=cur.votesAmountsData.purchaseDescr),PaymentsBox.trackingProtectionEnabled((function(){(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments",0,"votes","dmr_checkout","iframe_track_protection_enabled")}),(function(){(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments",0,"votes","dmr_checkout","iframe_track_protection_disabled")})),ajax.post("al_payments.php",l,{onDone:function(t,r,i){if(t){if(-2==t){var a=getLang("global_money_amount_rub",Math.floor(o));return val("payments_getvotes_confirm_msg",r),val("payments_box_votes_num",e),val("payments_box_amount",a),val("payments_box_votes_money",getLang("payments_money_for_votes",e).replace("{money}",a)),cur.votesAmountsData.resend_msg&&val("payments_getvotes_sms_resend",cur.votesAmountsData.resend_msg),cur.votesAmountsData.confirm_hash=i,val("confcode",""),show("payments_box_confcode_wrap"),PaymentsBox.enablePaymentTypesRows(),void PaymentsBox.approveGetCode()}if((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")&&PaymentsBox.showVotesAmounts(),!cur.paymentsWideBox){var s=ge("payments_getvotes_submit");PaymentsBox.setButtons(s.innerHTML,PaymentsBox.showConfirm,getLang("global_back"),PaymentsBox.showVotesAmounts)}cur._popup_text=r,cur._popup_callback=!1,cur._popup_callback=function(){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),hide("payments_getvotes_wrap","payments_getvotes_buttons","payments_box_progress","payments_box_error"),show("payments_iframe_container"),ge("payments_iframe_container").scrollTop=0};var c=ge("card_iframe");c.contentWindow.document.open("text/html","replace"),c.contentWindow.document.write(r),c.contentWindow.document.close(),cur._popup_callback(),cur.smsChkData=t,cur.isPaymentComplete=cur.isPaymentCanceled=cur.isPaymentFailed=!1,cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval((function(){PaymentsBox.checkStatus("dmr_checkout",t),n.use_iframe&&(cur.isPaymentCanceled||cur.isPaymentFailed)?(clearInterval(cur.smsChkStatInt),PaymentsBox.showVotesAmounts(),cur.isPaymentFailed?PaymentsBox.showBoxError(getLang("payments_landing_cancelled")):PaymentsBox.showBoxError(getLang("payments_payment_cancelled")),window.removeEventListener("message",PaymentsBox.frameMessage,!1)):cur.isPaymentComplete&&"dmr_checkout"!=n.name&&PaymentsBox.showTypes()}),2e3)}},onFail:e=>((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isButtonLocked)("payments_getvotes_submit")||PaymentsBox.setConfirmButtons(),PaymentsBox.showBoxError(e),!0),frame:_shared_lib_browser__WEBPACK_IMPORTED_MODULE_11__.browser.safari_mobile})}}static submitCard(e){if(!(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_box_progress")){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit");var t=cur.psList.card,n=!1,r=(e*t.vote_cost).toFixed(2);if(!e||e<=0?n=getLang("payments_web_no_sum"):t.min_amount&&e<t.min_amount?n=getLang("payments_min_amount_limit_votes").replace("%s",t.min_amount):t.max_amount&&e>t.max_amount?n=getLang("payments_max_amount_limit_votes").replace("%s",t.max_amount):null!=t.rest_amount_day&&e>t.rest_amount_day?n=getLang("payments_rest_amount_day_votes").replace("%s",t.rest_amount_day):null!=t.rest_amount_week&&e>t.rest_amount_week&&(n=getLang("payments_rest_amount_week_votes").replace("%s",t.rest_amount_week)),n)return PaymentsBox.showBoxError(n),!1;var o,i=PaymentsBox.getEmail();if(""===i)return(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),!1;if(i&&"false"!==i&&!PaymentsBox.validateEmail(i))return(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.notaBene)(cur.paymentsEmailInput),PaymentsBox.showBoxError(getLang("payments_error_invalid_email")),!1;if(cur.votesAmountsData.needApprove){var a=getLang("global_money_amount_rub",Math.floor(r));return val("payments_getvotes_confirm_msg",cur.votesAmountsData.needApprove),val("payments_box_votes_num",e),val("payments_box_amount",a),val("payments_box_votes_money",getLang("payments_money_for_votes",e).replace("{money}",a)),cur.votesAmountsData.resend_msg&&val("payments_getvotes_sms_resend",cur.votesAmountsData.resend_msg),val("confcode",""),delete cur.votesAmountsData.needApprove,show("payments_box_confcode_wrap"),void PaymentsBox.approveGetCode()}if(PaymentsBox.disablePaymentTypesRows(),t.use_iframe){var s=ge("payments_iframe_container"),c=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.ce)("iframe",{id:"card_iframe",name:"card_iframe"},{border:0,height:"435px",width:s.parentNode.offsetWidth+"px",overflowX:"hidden",overflowY:"hidden"});c.frameBorder=0,s.innerHTML="",s.appendChild(c),window.addEventListener("message",PaymentsBox.frameMessage,!1)}else{o=window.open("","_blank","scrollbars=1, resizable=1, menubar=1, left=0, top=0, toolbar=1, status=1"),cur._popup_text=PaymentsBox.popupHtml(getLang("payments_cards_redirect"),"",""),PaymentsBox.popupWrite(o)}var l={act:"a_getvotes_charge",type:"card",hash:cur.paymentsHash,amount:r,stat_session_id:cur.statSessionId};cur.paymentsAuthPayment&&(l.only_auth=1),i&&(l.email=i),cur.votesAmountsData.appoveCode&&(l.approve_code=cur.votesAmountsData.appoveCode),cur.isPaymentsAppOrder&&cur.paymentsOrderId&&(l.order_id=cur.paymentsOrderId,l.order_app_id=cur.paymentsOrderAppId,l.order_bill_period=cur.paymentsOrderBillPeriod,l.order_hash=cur.paymentsOrderHash),PaymentsBox.trackingProtectionEnabled((function(){(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments",0,"votes","dmr","iframe_track_protection_enabled")}),(function(){(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments",0,"votes","dmr","iframe_track_protection_disabled")})),ajax.post("al_payments.php",l,{onDone:function(n,i,a){if(n){if(-2==n){t.use_iframe||o.close();var s=getLang("global_money_amount_rub",Math.floor(r));return val("payments_getvotes_confirm_msg",i),val("payments_box_votes_num",e),val("payments_box_amount",s),val("payments_box_votes_money",getLang("payments_money_for_votes",e).replace("{money}",s)),cur.votesAmountsData.resend_msg&&val("payments_getvotes_sms_resend",cur.votesAmountsData.resend_msg),cur.votesAmountsData.confirm_hash=a,val("confcode",""),show("payments_box_confcode_wrap"),PaymentsBox.enablePaymentTypesRows(),void PaymentsBox.approveGetCode()}if((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")&&PaymentsBox.showVotesAmounts(),t.use_iframe||((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),PaymentsBox.showProgress()),cur._popup_text=i,cur._popup_callback=!1,t.use_iframe){cur._popup_callback=function(){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),hide("payments_getvotes_wrap","payments_getvotes_buttons","payments_box_progress","payments_box_error"),show("payments_iframe_container"),ge("payments_iframe_container").scrollTop=0};var c=ge("card_iframe");c.contentWindow.document.open("text/html","replace"),c.contentWindow.document.write(i),c.contentWindow.document.close(),cur._popup_callback()}else o.document.open("text/html","replace"),o.document.write(i),o.document.close(),o.blur(),o.focus();cur.smsChkData=n,cur.isPaymentComplete=cur.isPaymentCanceled=cur.isPaymentFailed=!1,cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval((function(){PaymentsBox.checkStatus("card",n),!t.use_iframe&&o.closed?setTimeout((function(){cur.isPaymentComplete||(clearInterval(cur.smsChkStatInt),PaymentsBox.showBoxError(getLang("payments_payment_cancelled"),"info_msg"),PaymentsBox.setConfirmButtons())}),500):t.use_iframe&&(cur.isPaymentCanceled||cur.isPaymentFailed)?(clearInterval(cur.smsChkStatInt),PaymentsBox.showVotesAmounts(),cur.isPaymentFailed?PaymentsBox.showBoxError(getLang("payments_landing_cancelled")):PaymentsBox.showBoxError(getLang("payments_payment_cancelled")),window.removeEventListener("message",PaymentsBox.frameMessage,!1)):cur.isPaymentComplete&&"alfabank"!=t.name&&"dmr"!=t.name&&PaymentsBox.showTypes()}),2e3)}},onFail:function(e){return t.use_iframe||o.close(),(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isButtonLocked)("payments_getvotes_submit")||PaymentsBox.setConfirmButtons(),PaymentsBox.showBoxError(e),!0},frame:_shared_lib_browser__WEBPACK_IMPORTED_MODULE_11__.browser.safari_mobile})}}static trackingProtectionEnabled(e,t){var n=new XMLHttpRequest;n.open("GET","https://top-fwz1.mail.ru/counter2?id=1",!0),n.onreadystatechange=function(){200!==n.status?e():t(),n.onreadystatechange=null},n.send()}static submitPaymentSystem(e){if(!(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_box_progress")){var t=cur.votesType,n=cur.psList[t],r=!1,o=0,i=0,a=0,s=0;if(!n.simple_redirect){if(!e)return;o=(e*n.vote_cost).toFixed(2),i=(e*n.vote_cost/cur.usdRate).toFixed(2),a=Math.floor(o),s=100*(o-a),!e||e<=0?r=getLang("payments_web_no_sum"):n.min_amount&&e<n.min_amount?r=getLang("payments_min_amount_limit_votes").replace("%s",n.min_amount):n.max_amount&&e>n.max_amount?r=getLang("payments_max_amount_limit_votes").replace("%s",n.max_amount):null!=n.rest_amount_day&&e>n.rest_amount_day?r=getLang("payments_rest_amount_day_votes").replace("%s",n.rest_amount_day):null!=n.rest_amount_week&&e>n.rest_amount_week&&(r=getLang("payments_rest_amount_week_votes").replace("%s",n.rest_amount_week))}if(r)return PaymentsBox.showBoxError(r),!1;var c=PaymentsBox.getEmail();if(""!==c)if(!c||"false"===c||PaymentsBox.validateEmail(c)){if(PaymentsBox.showProgress(),PaymentsBox.disablePaymentTypesRows(),"mailmoney_vkpay"===t){var l={act:"a_getvotes_charge",type:t,hash:cur.paymentsHash,amount:o,random_auth:0,stat_session_id:cur.statSessionId};ajax.post("al_payments.php",l,{onDone:e=>{var t=(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)(),n={noLocChange:1,skipBoxesHide:1,noClickHide:1};cur.isPaymentsAppOrder?cur.app.openAppInLayer(e,!1,!0,n):(0,_web_lib_feature_entries__WEBPACK_IMPORTED_MODULE_13__.showWiki)({w:e},!1,!1,n),t._hide(!1,!0),cur.onExternalAppDone=e=>{t._show(),e.status||(PaymentsBox.showBoxError(getLang("payments_payment_cancelled"),"info_msg"),PaymentsBox.setConfirmButtons(),clearInterval(cur.smsChkStatInt)),cur.onExternalAppDone=null,window.WkView&&WkView.hide(!1,!0)},cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval((function(){PaymentsBox.checkStatus(cur.votesType,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.data,null,t)}),2e3)},onFail:e=>(PaymentsBox.showBoxError(e),PaymentsBox.setConfirmButtons(),!0)})}else{if(cur.votesAmountsData.oauth_url&&(!ge("payments_remember_wallet")||(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isChecked)("payments_remember_wallet"))){var u=cur.votesAmountsData.oauth_params,d="";for(var _ in u){if(Object.prototype.hasOwnProperty.call(u,_))d+=`<input type="hidden" autocomplete="off" name="${_}" value="${u[_]}"/>`}var p=ge("paymentSystemsForm");p.action=cur.votesAmountsData.oauth_url,p.method="post",p.innerHTML=d;var h=cur.votesAmountsData.popup_params||{},f=h.width||700,m=h.height||600,v=`scrollbars=1, resizable=1, menubar=0, left=${Math.floor(window.screen.width/2)-f/2}, top=${Math.floor(window.screen.height/2)-m/2}, width=${f}, height=${m}`,g=getLang("payment_redirect").replace("%s",n.title),y=`<form action="${p.action}" method="${p.method}" id="popup_payment_form" accept-charset="UTF-8">${p.innerHTML}</form>`;cur._popup_text=PaymentsBox.popupHtml(g,y,"document.getElementById('popup_payment_form').submit()"),cur._popup_callback=!1,window.addEventListener("message",PaymentsBox.handlePaymentCompleteMessage,!1);var E=window.open("","_blank",v);cur.smsChkStatCnt=0,cur.oauthState=0;var w=0;return cur.smsChkStatInt=setInterval((function(){if(2==cur.oauthState)PaymentsBox.checkStatus(cur.votesType,cur.smsChkData);else if(0==cur.oauthState&&(w=cur.isPaymentComplete&&cur.paymentCompleteParams&&cur.paymentCompleteParams.code?cur.paymentCompleteParams.code:0)){cur.oauthState=1;var e={act:"a_getvotes_charge",type:t,oauth_code:w,hash:cur.paymentsHash,amount:o,stat_session_id:cur.statSessionId};return cur.paymentsAuthPayment&&(e.only_auth=1),c&&(e.email=c),void ajax.post("al_payments.php",e,{onDone:e=>{cur.oauthState=2,cur.smsChkData=e},onFail:e=>(clearInterval(cur.smsChkStatInt),PaymentsBox.showBoxError(e),PaymentsBox.setConfirmButtons(),!0)})}(E.closed&&!cur.isPaymentComplete||cur.isPaymentComplete&&!w)&&(clearInterval(cur.smsChkStatInt),cur.isPaymentComplete?PaymentsBox.showBoxError(getLang("payments_sms_money_fail")):PaymentsBox.showBoxError(getLang("payments_payment_cancelled"),"info_msg"),PaymentsBox.setConfirmButtons())}),2e3),void PaymentsBox.popupWrite(E)}if(cur.votesAmountsData.provider&&-1!==["dmr","paypal","yandexmoney","api_provider"].indexOf(cur.votesAmountsData.provider)){var b,C=getLang("payment_redirect").replace("%s",n.title),S={act:"a_getvotes_charge",type:t,hash:cur.paymentsHash,amount:o,random_auth:0,stat_session_id:cur.statSessionId};if(c&&(S.email=c),"paypal"===cur.votesAmountsData.provider||"yandexmoney"===cur.votesAmountsData.provider){var T;if(ge("payments_remember_wallet")?(S.remember_wallet=(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isChecked)("payments_remember_wallet")||cur.forceRebind,cur.forceRebind&&(cur.forceRebind=!1)):S.remember_wallet=1,S.remember_wallet){var A=cur.votesAmountsData.popup_params||{},D=A.width||700,P=A.height||600;T=`scrollbars=1, resizable=1, menubar=0, left=${Math.floor(window.screen.width/2)-D/2}, top=${Math.floor(window.screen.height/2)-P/2}, width=${D}, height=${P}`}else{T="scrollbars=1, resizable=1, menubar=1, left=0, top=0, toolbar=1, status=1"}b=S.remember_wallet?window.open("","",T):window.open("","_blank",T);var O=getLang("payment_redirect").replace("%s",n.title);cur._popup_text=PaymentsBox.popupHtml(O,"",""),PaymentsBox.popupWrite(b)}ajax.post("al_payments.php",S,{onDone:function(e,t,n){if(e){var r="api_provider"!==cur.votesAmountsData.provider;cur.canOpenPopup=r;var o=!r;PaymentsBox.checkStatusCallback=e=>{if("paypal"===cur.votesAmountsData.provider||"yandexmoney"===cur.votesAmountsData.provider){if(b&&!b.closed&&!o){o=!0;var t=ge("paymentSystemsForm");t.action=e.action,t.method="get";var n="";for(var r in e.params){if(Object.prototype.hasOwnProperty.call(e.params,r))n+=`<input type="hidden" autocomplete="off" name="${r}" value="${e.params[r]}"/>`}t.innerHTML=n;var i=`<form action="${t.action}" method="${t.method}" id="popup_payment_form" accept-charset="UTF-8">${t.innerHTML}</form>`;cur._popup_text=PaymentsBox.popupHtml(C,i,"document.getElementById('popup_payment_form').submit()"),PaymentsBox.popupWrite(b)}(b.closed&&!cur.isPaymentComplete||cur.isPaymentComplete)&&(clearInterval(cur.smsChkStatInt),PaymentsBox.showBoxError(cur.isPaymentComplete?getLang("payments_sms_money_fail"):getLang("payments_payment_cancelled")),PaymentsBox.setConfirmButtons())}else cur._popup||(cur._popup=window.open("","_blank"))},cur.smsChkData=e,cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval((()=>{PaymentsBox.checkStatus(cur.votesType,e)}),2e3)}},onFail:function(e){return(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isButtonLocked)("payments_getvotes_submit")||PaymentsBox.setConfirmButtons(),PaymentsBox.showBoxError(e),!0}})}else{if(!cur.isAdsPayment){var I={act:"a_getvotes_invoice",type:cur.votesType,amount:o,votes:e,invoice_hash:cur.votesAmountsData.invoice_hash,stat_session_id:cur.statSessionId};ajax.post("al_payments.php",I)}var k=n.gate_params,R="",M=ge("paymentSystemsForm"),L=(new Date).getTime();for(var x in k)if(Object.prototype.hasOwnProperty.call(k,x)){var N=k[x];R+=`<input type="hidden" autocomplete="off" name="${x}" value="${N=(N=(N=(N=(N=(N=N.replace("{amount_votes}",e)).replace("{amount_rub}",o)).replace("{amount_usd}",i)).replace("{amount_rub_int}",a)).replace("{amount_rub_frac}",s)).replace("{time}",L)}"/>`}var B=n.gate_url;B=(B=(B=(B=(B=(B=B.replace("{time}",L)).replace("{amount_votes}",e)).replace("{amount_rub}",o)).replace("{amount_usd}",i)).replace("{amount_rub_int}",a)).replace("{amount_rub_frac}",s),M.action=B,M.method=n.gate_method,M.innerHTML=R;var U=!1;try{var F=getLang("payment_redirect").replace("%s",n.title),W=`<form action="${M.action}" method="${M.method}" id="popup_payment_form" accept-charset="${n.gate_charset}">${M.innerHTML}</form>`;cur._popup_text=PaymentsBox.popupHtml(F,W,`Payments.submitPopupForm("${t}", "${e}", "${o}", "${i}")`),cur._popup_callback=!1,U=window.open("","_blank","scrollbars=1, resizable=1, menubar=1, left=0, top=0, toolbar=1, status=1"),(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments","","votes",t,"start"),cur.smsChkData=!1,cur.isPaymentComplete=!1,cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval((function(){PaymentsBox.checkStatus(cur.votesType,!1),U.closed&&!cur.isPaymentComplete&&(clearInterval(cur.smsChkStatInt),PaymentsBox.showBoxError(getLang("payments_payment_cancelled"),"info_msg"),n.simple_redirect?PaymentsBox.setButtons(!1,!1,cur.paymentsChangeType,PaymentsBox.showTypes):PaymentsBox.setConfirmButtons())}),2e3),PaymentsBox.popupWrite(U)}catch(e){M.submit()}c&&ajax.post("al_payments.php",{act:"a_set_receipt_email",email:c,hash:cur.paymentsHash},{onFail:e=>!0})}}}else PaymentsBox.showBoxError(getLang("payments_error_invalid_email"))}}static approveSendCode(){var e=ge("confcode").value;if(e.length){hide("payments_box_error");for(var t=0,n=0;n<e.length;n++)t+=parseInt(e[n]);if((t%=10)!=cur.votesAmountsData.approveCodeChk)return PaymentsBox.showBoxError(getLang("payments_invalid_code")),void(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.notaBene)("confcode");cur.votesAmountsData.appoveCode=e,PaymentsBox.showConfirm()}else(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.notaBene)("confcode")}static approveGetCode(e){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit");var t={act:"a_getvotes_approve_code",hash:cur.votesAmountsData.confirm_hash};return e&&(t.resend=1),ajax.post("al_payments.php",t,{onDone:function(t,n){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),1==t?PaymentsBox.showBoxError(n):e||(cur.votesAmountsData.approveCodeChk=n,PaymentsBox.refreshBox(),show("payments_getvotes_confirm"),PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.approveSendCode,cur.paymentsChangeType,cur.checkoutEnabled?PaymentsBox.showVotesAmounts:PaymentsBox.showTypes))},onFail:function(e){return PaymentsBox.showBoxError(e),PaymentsBox.setConfirmButtons(),!0}}),!1}static smsSendPin(){if(null==cur.votesAmountsVal)return!1;var e=cur.votesAmountsData[cur.votesAmountsVal][3],t=cur.votesAmountsData[cur.votesAmountsVal][2];if(4!=e&&8!=t&&(2!=e||5!=t))return!1;var n=ge("confcode").value;n.length&&((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit"),ajax.post("al_payments.php",{act:"a_getvotes_validate",code:n,oid:cur.votesAmountsData[cur.votesAmountsVal][3],qid:cur.smsChkData.qid,hash:cur.smsChkData.hash},{onDone:function(){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),PaymentsBox.showProgress(),cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval(PaymentsBox.checkStatus.pbind("sms",cur.smsChkData),2e3)},onFail:function(e){return PaymentsBox.showBoxError(e),!0}}))}static smsSendCode(){if("card"===cur.votesType)return!1;if(null!=cur.votesAmountsVal){var e=cur.votesAmountsData[cur.votesAmountsVal][3],t=cur.votesAmountsData[cur.votesAmountsVal][2];if(4==e||8==t||2==e&&5==t)return PaymentsBox.smsSendPin()}var n=ge("confcode").value;n.length?((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit"),ajax.post("al_payments.php",{act:"a_getvotes_validate",pid:cur.votesAmountsVal,code:n,hash:cur.votesAmountsData[cur.votesAmountsVal].hash},{onDone:function(e){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),e&&3==cur.votesAmountsData[cur.votesAmountsVal][2]?PaymentsBox.getVotesCharge(!1,!0):e&&PaymentsBox.getVotesCharge()},onFail:function(e){return PaymentsBox.showBoxError(e),!0}})):(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.notaBene)("confcode")}static smsGetCode(e){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit");var t={act:"a_getvotes_validate",hash:cur.votesAmountsData[cur.votesAmountsVal].hash,pid:cur.votesAmountsVal};e&&(t.resend=1),ajax.post("al_payments.php",t,{onDone:function(e,t){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),2==e?(PaymentsBox.showBoxError(t,"ok_msg"),(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.elfocus)("confcode")):e&&3==cur.votesAmountsData[cur.votesAmountsVal][2]?PaymentsBox.getVotesCharge(!1,!0):e?PaymentsBox.getVotesCharge():(PaymentsBox.refreshBox(),show("payments_getvotes_confirm"),(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.elfocus)("confcode"),cur.paymentsWideBox?PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.smsSendCode,getLang("payments_change_phone_number"),PaymentsBox.showPhoneForm):PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.smsSendCode,cur.paymentsChangeType,PaymentsBox.showTypes))},onFail:function(e){return PaymentsBox.showBoxError(e),PaymentsBox.setConfirmButtons(),(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.elfocus)("confcode"),!0}})}static confirmPinCode(){var e=(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_7__.trim)(ge("confcode").value);if(e.length){var t={act:"a_getvotes_confirm_pin",hash:cur.updateTnxHash,ps:cur.votesType,qid:cur.smsChkData.qid,pin:e};PaymentsBox.showProgress(),ajax.post("al_payments.php",t,{onDone:function(){cur.smsChkStatInt=setInterval((()=>{PaymentsBox.checkStatus(cur.votesType,cur.smsChkData)}),2e3)},onFail:function(e){PaymentsBox.refreshBox(),PaymentsBox.showBoxError(e)}})}else(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.notaBene)("confcode")}static checkPinKeyPress(e){if(!((e=e||window.event).ctrlKey||e.altKey||e.metaKey)){var t=null;if(null===e.which&&e.keyCode>=32?t=String.fromCharCode(e.keyCode):0!==e.which&&0!==e.charCode&&e.which>=32&&(t=String.fromCharCode(e.which)),null!==t)return!(t<"0"||t>"9")&&void 0}}static fillBDay(){var params={act:"a_getvotes_fill_bday"};ajax.post("al_payments.php",params,{onDone:function onDone(js){if(js)try{eval(js)}catch(e){(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__.logEvalError)(e,js)}}})}static showOffer(e){var t={act:"a_getvotes_offer",offer_id:e,offer_aid:cur.paymentsOfferApp||0,app_currency:cur.offersAppCurrency||0};cur.app&&cur.app.options&&(t.aid=cur.app.options.aid),cur.paymentsOfferPreview&&(t.offer_view=cur.paymentsOfferPreview),ajax.post("al_payments.php",t,{onDone:PaymentsBox.offerOnLoad,onFail:e=>(e&&(PaymentsBox.showBoxError(e),hide("payments_getvotes_wrap")),!0)})}static showNextOffers(e){var t={act:"a_getvotes_amounts",type:"offers",offset:cur.offersOffset,app_currency:cur.offersAppCurrency,hash:cur.paymentsHash};cur.app&&cur.app.options&&(t.isAppOrder=cur.paymentsOfferApp?1:0,t.aid=cur.app.options.aid),ajax.post("al_payments.php",t,{onDone:function(t,n){n&&(t||(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.re)(e),cur.offersOffset+=20,ge("payments_offers_wrap").innerHTML+=n,PaymentsBox.checkOffers())},showProgress:_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton.pbind(e),hideProgress:_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton.pbind(e)})}static showConfirm(){cur.votesAmountsVal=ge("payments_getvotes_amounts")?(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.radioval)("payments_getvotes_amounts"):0;var e=ge("votes_num")?parseInt(ge("votes_num").value,10):0;if(void 0!==cur.votesAmountsVal){cur.votesAmountsVal&&null==cur.votesAmountsData[cur.votesAmountsVal]&&ge("votes_num")&&!e&&(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.notaBene)("votes_num");var t=ge("payments_spasibo_rules_accept");if(t&&!(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isChecked)(t)){var n={text:getLang("payments_spasibo_rules_not_accepted"),dir:"auto",className:"payments_terminal_tt",hasover:1};return cur.paymentsWideBox&&(n=extend(n,{shift:[-30,10]})),void(0,_web_lib_tooltip_utils__WEBPACK_IMPORTED_MODULE_9__.showTooltip)(t,n)}if((0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)().changed=!0,"sms"===cur.votesType){cur.isResetCheckedMaxSmsVotesValue&&(ge("payments_getvotes_confirm_msg").innerHTML=cur.votesAmountsData.confirm_msg_again,cur.isResetCheckedMaxSmsVotesValue=!1);var r=cur.votesAmountsData.confirm_type;if(2==r&&null!=cur.votesAmountsData.checked_max_sms_votes_val&&(cur.votesAmountsVal=cur.votesAmountsData.checked_max_sms_votes_val,cur.votesAmountsData.checked_max_sms_votes_val=0,cur.isResetCheckedMaxSmsVotesValue=!0),null==cur.votesAmountsData[cur.votesAmountsVal]&&e){if(!r)return void PaymentsBox.getVotesCharge(e,!0);cur.votesAmountsData[-1]=[e,getLang("global_money_amount_rub",cur._otherAmount),cur.votesAmountsData[0][2],0],cur.votesAmountsVal=-1}void 0===cur.votesAmountsData[cur.votesAmountsVal]&&(cur.votesAmountsVal=0);var o=cur.votesAmountsData[cur.votesAmountsVal][0],i=cur.votesAmountsData[cur.votesAmountsVal][1],a=cur.votesAmountsData[cur.votesAmountsVal][2],s=cur.votesAmountsData[cur.votesAmountsVal][3],c=cur.votesAmountsData[cur.votesAmountsVal][6];if(0==a){cur.smsChkData={oid:s,qid:0,hash:cur.votesAmountsData.check_hash};var l=getLang("payments_to_get_send_sms",o);cur.paymentsWideBox||(l+=`<br/>${getLang("payments_service_cost")}`);var u=cur.votesAmountsData[cur.votesAmountsVal];if(l=(l=(l=l.replace("{number}",cur.votesAmountsData[cur.votesAmountsVal][4])).replace("{text}",`<nobr>${cur.votesAmountsData[cur.votesAmountsVal][5]}${vk.id}</nobr>`)).replace("{amount}",cur.votesAmountsData[cur.votesAmountsVal][1]),u.invoice_hash&&cur.statSessionId){PaymentsBox.showWaiting("");var d={act:"a_getvotes_invoice",type:cur.votesType,oid:s,votes:o,invoice_hash:u.invoice_hash,stat_session_id:cur.statSessionId};ajax.post("al_payments.php",d,{onDone:function(){ge("payments_getvotes_waiting_msg").innerHTML=l},onFail:function(e){return clearInterval(cur.smsChkStatInt),PaymentsBox.needContinue=0,(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_waiting")||(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")?PaymentsBox.showVotesAmounts():PaymentsBox.setButtons(cur.payments_get_votes,(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")?PaymentsBox.getVotesCharge:PaymentsBox.showConfirm,cur.paymentsChangeType,PaymentsBox.showTypes),PaymentsBox.showBoxError(e),!0}})}else PaymentsBox.showWaiting(l)}else if(5==a||6==a||8==a)PaymentsBox.getVotesCharge();else if(7==a){PaymentsBox.getVotesCharge(),cur._popup_text=PaymentsBox.popupHtml(getLang("payments_cards_redirect"),"",""),cur._popup_callback=!1,cur._popup_href=!1;var _="/payments?act=go_gate&type=sms",p=Math.floor(window.screen.width/2)-350,h=Math.floor(window.screen.height/2)-300;(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__.debugLog)(_),cur._popup=window.open(_,"_blank",`scrollbars=1, resizable=1, menubar=0, left=${p}, top=${h}, width=700, height=600`)}else if(1!=a&&4!=a&&1!=r)PaymentsBox.getVotesCharge(!1,!0);else{if(val("payments_box_votes_num",o),val("payments_box_amount",i),val("payments_box_votes_money",c),3==s&&(PaymentsBox.checkStatusCallback=function(e){cur.isResetCheckedMaxSmsVotesValue=!1,cur.checkedMaxVotes=e,PaymentsBox.getVotesAmounts(!0)}),2==r&&o<=cur.votesAmountsData.confirm_max_votes){if(cur.paymentsWideBox)return void PaymentsBox.getVotesCharge();hide("payments_box_confcode_wrap"),PaymentsBox.refreshBox(),show("payments_getvotes_confirm"),PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.getVotesCharge,getLang("global_back"),PaymentsBox.showVotesAmounts)}else show("payments_box_confcode_wrap"),PaymentsBox.smsGetCode();cur.votesAmountsData.resend_msg&&val("payments_getvotes_sms_resend",cur.votesAmountsData.resend_msg),cur.votesAmountsData.confirm_wait_comment&&cur.votesAmountsData.confirm_wait_comment[s]?(val("payments_getvotes_confirm_comm",cur.votesAmountsData.confirm_wait_comment[s]),show("payments_getvotes_confirm_comm_wrap")):(ge("payments_getvotes_confirm_comm").innerHTML="",hide("payments_getvotes_confirm_comm_wrap"))}}else{var f;f=cur.votesAmountsData[cur.votesAmountsVal]?cur.votesAmountsData[cur.votesAmountsVal][0]:e,cur.checkoutEnabled?PaymentsBox.submitDmrCheckout(f):"card"===cur.votesType?PaymentsBox.submitCard(f):PaymentsBox.submitPaymentSystem(f)}}}static offerOnLoad(html,js){(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),hide("payments_offers_list");var offerView=ge("payments_offer_view");if(offerView){offerView.innerHTML=html,show(offerView);try{eval(js)}catch(e){(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__.logEvalError)(e,js)}}}static showWaiting(e){var t=cur.votesAmountsData[cur.votesAmountsVal]?cur.votesAmountsData[cur.votesAmountsVal][3]:0;ge("payments_getvotes_waiting_msg").innerHTML=e,t&&cur.votesAmountsData.confirm_wait_comment&&cur.votesAmountsData.confirm_wait_comment[t]?(ge("payments_getvotes_waiting_comm").innerHTML=cur.votesAmountsData.confirm_wait_comment[t],show("payments_getvotes_waiting_comm")):(ge("payments_getvotes_waiting_comm").innerHTML="",hide("payments_getvotes_waiting_comm")),PaymentsBox.refreshBox(),show("payments_getvotes_waiting"),hide("payments_getvotes_buttons"),cur.paymentsWideBox&&cur.votesAmountsData[cur.votesAmountsVal]&&cur.votesAmountsData[cur.votesAmountsVal][7]?(ge("payments_getvotes_waiting_amount").innerHTML=cur.votesAmountsData[cur.votesAmountsVal][6],ge("payments_getvotes_waiting_phone").innerHTML=cur.votesAmountsData[cur.votesAmountsVal][7],show("payments_getvotes_waiting_mo")):hide("payments_getvotes_waiting_mo"),delete cur.paymentsWaitingCache[cur.votesType],cur.smsChkStatInt&&clearInterval(cur.smsChkStatInt),cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval(PaymentsBox.checkStatus.pbind(cur.votesType,cur.smsChkData),2e3)}static showPhoneForm(e,t){geByClass1("_msg","payments_getvotes_phone").innerHTML=t||getLang("payments_get_votes_input_phone"),ge("phone").value="",PaymentsBox.refreshBox(),t&&cur.paymentsWideBox?PaymentsBox.setButtons(getLang("payments_save_phone"),PaymentsBox.saveSmsPhone):PaymentsBox.setButtons(getLang("payments_save_phone"),PaymentsBox.saveSmsPhone,getLang("global_back"),2==e?PaymentsBox.getVotesAmounts:e?PaymentsBox.showVotesAmounts:PaymentsBox.showTypes),show("payments_getvotes_phone");var n=cur.uiPhoneCountry.container;if("spasibo"===cur.votesType)hide(n),val("payments_phone_prefix","+79");else{var r=cur.uiPhoneCountry.selectedItems();if(r.length>0)val("payments_phone_prefix",r[0][3]);else for(var o=0,i=cur.countries.length;o<i;++o)cur.countries[o][0]==cur.defCountry&&val("payments_phone_prefix",cur.countries[o][3]);show(n)}return cur.paymentsBoxClass=ge("payments_box").className,addClass("payments_box","payments_phone_form"),!1}static showPaySystemsList(){return PaymentsBox.refreshBox(),cur.paymentsWideBox&&(ge("payments_getvotes_title").innerHTML=ge("payments_ps_list_title_header").innerText),show("payments_getvotes_ps","payments_votes_vkpay_promo_banner"),cur.votesType=!1,PaymentsBox.setButtons(!1,!1,cur.paymentsChangeType,PaymentsBox.showTypes),!1}static showVotesAmounts(){return PaymentsBox.refreshBox(),cur.checkoutEnabled?PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm):"card"!==cur.votesType&&cur.psList[cur.votesType]&&!cur.psList[cur.votesType].in_menu?PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm,getLang("payments_go_ps_list"),PaymentsBox.showPaySystemsList):PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm,cur.paymentsChangeType,PaymentsBox.showTypes),show("payments_getvotes_cont","payments_getvotes_wrap","payments_getvotes_buttons"),cur.paymentsWideBox&&cur.paymentsOrderNotice&&((0,_web_lib_ui_util__WEBPACK_IMPORTED_MODULE_15__.showMsg)("payments_box_error",cur.paymentsOrderNotice,"info_msg",null),show("payments_box_error")),(0,_web_lib_accessibility__WEBPACK_IMPORTED_MODULE_16__.updateAriaElements)(),delete cur.votesAmountsData.appoveCode,!1}static showTypes(){if(cur.paymentsWideBox)return PaymentsBox.showVotesAmounts(),!1;(PaymentsBox.refreshBox(),cur.votesAmountsVal=void 0,cur.votesAmountsData=[],hide("payments_getvotes_buttons"),show("payments_getvotes_method","payments_votes_vkpay_promo_banner"),cur.paymentBoxTitle)&&(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)().setOptions({title:cur.paymentBoxTitle});return!1}static setButtons(e,t,n,r){if(!cur.paymentsWideBox||e){if(e){var o=ge("payments_getvotes_submit");o&&(o.innerHTML=e,o.onclick=t,o.dataset.taskClick="",show(o,"payments_getvotes_buttons"))}else hide("payments_getvotes_buttons");if(cur.paymentsWideBox){var i=ge("payments_getvotes_back");i&&(i.innerHTML="",n&&i.appendChild((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.ce)("div",{className:"button",innerHTML:n,onclick:r,"data-task-click":""})))}else{var a=(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)();a&&(cur.paymentBoxTitle||(cur.paymentBoxTitle=a.getOptions().title),n?(geByClass1("box_title",a.titleWrap).innerHTML=`<div class="back"><span class="back__icon">${(0,_icons_desktop_getIcon24BrowserBack__WEBPACK_IMPORTED_MODULE_21__.getIcon24BrowserBack)().icon}</span>${getLang("global_box_title_back")}</div>`,geByClass1("back",a.titleWrap).onclick=r,geByClass1("back",a.titleWrap).dataset.taskClick=""):geByClass1("box_title",a.titleWrap).innerHTML=cur.paymentBoxTitle)}}else hide("payments_getvotes_buttons")}static showBoxError(e,t){if("object"==typeof e&&(e=getLang("global_error_occured")),e&&cur.paymentsWideBox&&cur.checkoutEnabled){var n=new _web_lib_message_box__WEBPACK_IMPORTED_MODULE_8__.MessageBox({title:getLang("global_error"),hideButtons:!0});(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)().hide(),n.content(e).show()}else{if(e){var r=ge("payments_box_error");r&&(val(r,""),(0,_web_lib_ui_util__WEBPACK_IMPORTED_MODULE_15__.showMsg)(r,e,t||"error"),show(r))}hide("payments_box_progress","payments_iframe_container"),show("payments_getvotes_wrap"),(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),PaymentsBox.hideRowProgress(),PaymentsBox.enablePaymentTypesRows()}}static showProgress(e){val("payments_box_progress_msg","string"==typeof e?e:getLang("payments_waiting_payment_complete")),hide("payments_box_error","payments_getvotes_wrap","payments_getvotes_buttons"),cur.paymentsWideBox&&e?show("payments_box_progress_link"):e||hide("payments_box_progress_link"),show("payments_box_progress")}static hideRowProgress(){["payments_getvotes_ps",cur.paymentsWideBox?"payments_box_menu":"payments_getvotes_method"].forEach((e=>{(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)(e)&&(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("payments_getvotes_active_row",ge(e)).forEach((t=>{"payments_box_menu"!==e?removeClass(t,"payments_getvotes_active_row"):removeClass(t,"payments_progress")}))}))}static refreshBox(){hide("payments_box_progress","payments_box_error","payments_getvotes_method","payments_getvotes_cont","payments_getvotes_phone","payments_getvotes_confirm","payments_getvotes_waiting","payments_getvotes_other","payments_getvotes_terminals","payments_getvotes_ps","payments_iframe_container"),show("payments_getvotes_wrap"),cur.smsChkStatInt&&!cur.paymentsWideBox&&clearInterval(cur.smsChkStatInt),cur.paymentsBoxClass&&(ge("payments_box").className=cur.paymentsBoxClass,cur.paymentsBoxClass=""),PaymentsBox.enablePaymentTypesRows()}static saveSmsPhone(){var e=(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_7__.trim)(val("phone")),t=(0,_web_lib_utils_common__WEBPACK_IMPORTED_MODULE_7__.trim)(val(ge("payments_phone_prefix")||{})||"");e&&(cur.paymentsWaitingCache.sms&&(clearInterval(cur.paymentsWaitingCache.sms[2]),delete cur.paymentsWaitingCache.sms),cur.newSmsPhone=t+e,PaymentsBox.getVotesAmounts())}static startFormMeasure(){cur.formMeasureTime=Date.now(),vk.dev&&(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__.debugLog)(cur.formMeasureTime)}static finishFormMeasure(e){if(cur.formMeasureTime){var t=Date.now()-cur.formMeasureTime;vk.dev&&(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__.debugLog)(t),delete cur.formMeasureTime,(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments_frame_load_time",t,e)}}static frameMessage(e){if(!e.origin.match(/^https?:\/\/([a-zA-Z0-9\-\.]+\.)?paymentgate\.ru$/)&&!e.origin.match(/^https?:\/\/([a-zA-Z0-9\-\.]+\.)?money\.mail\.ru$/))return!1;var t={};if(!e.data||"{"!==e.data.substr(0,1)||"billing"===(t=(0,_web_lib_utils__WEBPACK_IMPORTED_MODULE_17__.parseJSON)(e.data)).type)if("pageLoad"===t.action)cur.paymentsIgnoreResize=!1;else if("paySuccess"===t.action)cur.paymentsIgnoreResize=!0,cur.checkoutEnabled&&(PaymentsBox.showProgress(),hide("payments_iframe_container"));else if("submit"===e.data||"3dsPage"===t.action)setTimeout(PaymentsBox.frameHeight.pbind(600,!0),200),addClass("payments_iframe_container",cur.checkoutEnabled?"payments_threeds_checkout_frame":"payments_threeds_frame");else if("3dsFinish"===t.action)PaymentsBox.frameHeight(),removeClass("payments_iframe_container",cur.checkoutEnabled?"payments_threeds_checkout_frame":"payments_threeds_frame");else if("resizeFrame"===t.action)if(t.action_params.height<10&&cur.paymentsIgnoreResize)cur.paymentsIgnoreResize=!1;else{var n=ge("payments_iframe_container");n&&!hasClass(n,"payments_threeds_checkout_frame")&&setTimeout(PaymentsBox.frameHeight.pbind(t.action_params.height),200)}else"putPixel"===t.action&&"page_load"===t.action_params.alias?(PaymentsBox.finishFormMeasure("dmr"),(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments",0,"votes","dmr","iframe_loaded")):"session_fail"===t.action?(0,_shared_lib_statlogs__WEBPACK_IMPORTED_MODULE_12__.statlogsValueEvent)("payments",0,"votes","dmr","iframe_session_fail"):"payError"===t.action&&cur.checkoutEnabled?PaymentsBox.checkoutDecline(t.action_params):"typePaymentMethod"===t.action&&cur.checkoutEnabled&&(removeClass("payments_iframe_container","payments_threeds_checkout_frame"),t.action_params&&t.action_params.system&&PaymentsBox.checkoutPayMethodChanged(t.action_params.system))}static frameHeight(e,t){var n=ge("card_iframe");n&&(e?(cur.prevFrameHeight=n.style.height,n.style.height=e+"px"):(n.style.height=cur.prevFrameHeight,removeClass("payments_iframe_container",cur.checkoutEnabled?"payments_threeds_checkout_frame":"payments_threeds_frame")));var r=ge("payments_iframe_container");r&&(cur.paymentsWideBox&&!cur.checkoutEnabled||t||(r.style.height=(e||cur.prevFrameHeight)+(cur.checkoutEnabled?0:10)+"px"),r.scrollTop=0)}static paymentCanceled(e){e?cur.isPaymentFailed=!0:cur.isPaymentCanceled=!0,PaymentsBox.frameHeight()}static checkoutDecline(e){var t=e||{};t.act="checkout_decline",t.qid=cur.smsChkData.qid,t.hash=cur.smsChkData.declineHash,ajax.post("payments",t,{onDone:function(e){return PaymentsBox.stopCheckAndShowError(e),!0},onFail:function(e){return PaymentsBox.stopCheckAndShowError(e),!0}})}static checkoutPayMethodChanged(e){e&&ajax.post("payments",{act:"checkout_ps_choose",qid:cur.smsChkData.qid,pay_method:e})}static stopCheckAndShowError(e){clearInterval(cur.smsChkStatInt),PaymentsBox.needContinue=0,(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_waiting")||(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")?PaymentsBox.showVotesAmounts():cur.checkoutEnabled?PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm):PaymentsBox.setButtons(cur.payments_get_votes,(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")?PaymentsBox.getVotesCharge:PaymentsBox.showConfirm,cur.paymentsChangeType,PaymentsBox.showTypes),PaymentsBox.showBoxError(e)}static complete(e,t){cur.paymentCompleteParams=t,cur.isPaymentComplete=!0}static checkStatus(e,t,n,r){if("sms"===e&&(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_box_progress")&&!cur.paymentsWideBox&&7!=cur.votesAmountsData[cur.votesAmountsVal][2])if(15==cur.smsChkStatCnt)ge("payments_box_progress_msg").innerHTML=getLang("payments_waiting_payment_complete_still");else if(cur.smsChkStatCnt>30){return clearInterval(cur.smsChkStatInt),cur.isPaymentAttemted=!0,(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)().hide(),void(0,_web_lib_message_box__WEBPACK_IMPORTED_MODULE_8__.showFastBox)(getLang("payments_internet_getting_votes"),getLang("payments_get_votes_delay"))}var o={act:"a_getvotes_check",type:e,votes_purchase:cur.isPaymentsAppOrder||cur.paymentsWideBox||cur.paymentsInstantPayType?0:1};t&&(t.oid||t.qid)?(o.oid=t.oid,o.qid=t.qid,o.hash=t.hash):o.hash=cur.psList[e].check_hash,0==cur.smsChkStatCnt&&(o.start=1),cur.statSessionId&&(o.stat_session_id=cur.statSessionId),t.test&&(o.test=1);var i=r||(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)();ajax.post("al_payments.php",o,{onDone:function(n,r,o){if("sms"===e&&cur._popup&&cur._popup.closed)return clearInterval(cur.smsChkStatInt),cur.smsChkStatCnt=0,PaymentsBox.showBoxError(getLang("payments_payment_cancelled"),"info_msg"),void PaymentsBox.setConfirmButtons();if(n){if(1==n){for("mailmoney_vkpay"===e&&WkView&&(i._show(),cur.onExternalAppDone=null,WkView.hide(!1,!0)),cur.isPaymentAttemted=!0,PaymentsBox.needContinue&&(cur.needContinue=1,PaymentsBox.needContinue=0);boxQueue.count();)boxQueue.hideLast(!1);if((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.re)("left_block10_0"),r&&!cur.isPaymentsAppOrder&&(!cur.paymentsTryCompleteOrder||!i.onDone)){var a=new _web_lib_message_box__WEBPACK_IMPORTED_MODULE_8__.MessageBox({width:400,hideButtons:!0,bodyStyle:"padding: 0; border-radius: 8px;"});a.content(r),a.show()}o&&(0,_web_lib_utils__WEBPACK_IMPORTED_MODULE_17__.updateMoney)(o)}else if(2==n||10==n)(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_waiting")||(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")||(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_iframe_container")?PaymentsBox.showVotesAmounts():PaymentsBox.setButtons(cur.payments_get_votes,(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")?PaymentsBox.getVotesCharge:PaymentsBox.showConfirm,cur.paymentsChangeType,PaymentsBox.showTypes),PaymentsBox.showBoxError(r);else if(3==n){var s="sms"===e;cur.votesAmountsData[cur.votesAmountsVal]?(val("payments_box_votes_num",cur.votesAmountsData[cur.votesAmountsVal][0]),val("payments_box_amount",cur.votesAmountsData[cur.votesAmountsVal][1]),val("payments_box_votes_money",s?cur.votesAmountsData[cur.votesAmountsVal][6]:cur.votesAmountsData[cur.votesAmountsVal][1])):(val("payments_box_votes_num",cur._otherVotes),val("payments_box_amount",cur._otherAmount+" "+(0,_web_lib_lang__WEBPACK_IMPORTED_MODULE_10__.langNumeric)(cur._otherAmount,cur.votesAmountsData.currency_price_str)),val("payments_box_votes_money",cur._otherAmount+" "+(0,_web_lib_lang__WEBPACK_IMPORTED_MODULE_10__.langNumeric)(cur._otherAmount,cur.votesAmountsData.currency_price_str))),s||(val("payments_getvotes_confirm_msg",getLang("payments_get_votes_ps_enter_code")),hide("payments_getvotes_confirm_amount")),cur.votesAmountsData.confirm_wait_comment&&cur.votesAmountsData.confirm_wait_comment[t.oid]?(ge("payments_getvotes_confirm_comm").innerHTML=cur.votesAmountsData.confirm_wait_comment[t.oid],show("payments_getvotes_confirm_comm_wrap")):s&&(ge("payments_getvotes_confirm_comm").innerHTML="",hide("payments_getvotes_confirm_comm_wrap")),"spasibo"===e&&(cur.updateTnxHash=r),PaymentsBox.refreshBox(),show("payments_box_confcode_wrap","payments_getvotes_confirm"),s&&r&&PaymentsBox.showBoxError(r),ge("confcode").onkeypress=s?"":PaymentsBox.checkPinKeyPress,PaymentsBox.setButtons(cur.payments_get_votes,s?PaymentsBox.smsSendCode:PaymentsBox.confirmPinCode,cur.paymentsChangeType,PaymentsBox.showTypes)}else{if(4==n){if(!(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_waiting")&&!cur.paymentsWaitingCache.sms){var c=getLang("payments_to_get_send_sms",cur.votesAmountsData[cur.votesAmountsVal][0]);cur.paymentsWideBox||(c+=`<br/>${getLang("payments_service_cost")}`),c=(c=(c=c.replace("{number}",r.service_number)).replace("{text}",`<nobr>${r.message_text}</nobr>`)).replace("{amount}",cur.votesAmountsData[cur.votesAmountsVal][1]),PaymentsBox.showWaiting(c)}return}if(5==n)PaymentsBox.refreshBox(),PaymentsBox.showConfirm();else if(6==n)delete cur.votesAmountsData.oauth_url,delete cur.paymentsInstantPayType,PaymentsBox.showVotesAmounts(),PaymentsBox.showBoxError(getLang("payments_instant_pay_amount_limit_error")),PaymentsBox.setConfirmButtons(),hide("payments_remember_wallet",geByClass1("payments_getvotes_confirm_descr","payments_getvotes_cont"));else{if(7==n)return void(cur._popup&&!cur._popup_href&&(cur._popup_href=r,cur._popup.location.href=r));if(8==n)return void PaymentsBox.checkStatusCallback(r);if(9==n)return void PaymentsBox.show3DsFrame(r,o)}}clearInterval(cur.smsChkStatInt),cur.smsChkStatCnt=0}},onFail:function(e){return PaymentsBox.stopCheckAndShowError(e),!0}}),cur.smsChkStatCnt++}static checkStatusCallback(e){}static getVotesCharge(e,t){if(!(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.isButtonLocked)("payments_getvotes_submit")&&!(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_box_progress")&&((e=parseInt(e,10))||null!=cur.votesAmountsVal&&cur.votesAmountsData[cur.votesAmountsVal])){var n={act:"a_getvotes_charge",type:cur.votesType,hash:cur.paymentsHash,stat_session_id:cur.statSessionId},r=PaymentsBox.getEmail();""!==r&&(r&&(n.email=r),t?(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit"):PaymentsBox.showProgress(),e?(n.pid=-1,n.votes=e):(n.pid=cur.votesAmountsVal,-1==cur.votesAmountsVal&&(n.votes=cur.votesAmountsData[cur.votesAmountsVal][0])),cur.isResetCheckedMaxSmsVotesValue&&(n.pay_by_repay_status=1),PaymentsBox.disablePaymentTypesRows(),ajax.post("al_payments.php",n,{onDone:n=>{PaymentsBox.votesChargeOnDone(n,e,t)},onFail:e=>((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_box_progress")&&PaymentsBox.setButtons(cur.payments_get_votes,(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_confirm")?PaymentsBox.getVotesCharge:PaymentsBox.showConfirm,cur.paymentsChangeType,PaymentsBox.showTypes),PaymentsBox.showBoxError(e),!0)}))}}static votesChargeOnDone(e,t,n){if(e)if((0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),-1==e)PaymentsBox.getVotesAmounts(!0);else if(e.qid)if(cur.smsChkData=e,n){var r=getLang("payments_for_get_n_votes",t||cur.votesAmountsData[cur.votesAmountsVal][0]),o=cur.votesAmountsData.confirm_wait_msg.replace("{amount}",r);if(o+=t?`<br/>${getLang("payments_service_cost_rubles",cur._otherAmount)}`:`<br/>${getLang("payments_service_cost").replace("{amount}",cur.votesAmountsData[cur.votesAmountsVal][1])}`,cur.paymentsWideBox)o+=`<br><br/><a onclick="return PaymentsBox.showPhoneForm(1);">${getLang("payments_change_phone_number")}</a>`;PaymentsBox.showWaiting(o)}else cur.smsChkStatCnt=0,cur.smsChkStatInt=setInterval(PaymentsBox.checkStatus.pbind(cur.votesType,e),2e3)}static getVotesAmounts(e,t,n){if(null!=t&&cur.paymentsWideBox){if(cur.votesType==t&&cur.votesTypeInit!=t&&((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_cont")||(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_terminals")||(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_ps")))return;(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_waiting")?cur.paymentsWaitingCache[cur.votesType]=[ge("payments_getvotes_title").innerHTML,ge("payments_getvotes_waiting").innerHTML,cur.smsChkStatInt]:cur.smsChkStatInt&&!cur.paymentsWaitingCache[t]&&clearInterval(cur.smsChkStatInt),cur.votesType=t}else null!=t&&(cur.votesType=t);if(cur.votesType){if(cur.paymentsWideBox&&!n&&(n=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.domPN)(geByClass1("payments_method_"+cur.votesType,ge("payments_box_menu")))),cur.paymentsWideBox&&cur.paymentsTypesSum&&cur.paymentsTypesSum[t]){var r=ge("payments_summary_bill");r?r.innerHTML=cur.paymentsTypesSum[t]:val("payments_order_sum",cur.paymentsTypesSum[t]),each((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("payments_tt"),((e,t)=>{(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.re)(t)}))}var o="term"===cur.votesType||"ps"===cur.votesType;if(o){PaymentsBox.refreshBox(),hide("payments_getvotes_method");var i="";if("term"===cur.votesType?(show("payments_getvotes_terminals"),hide("payments_votes_vkpay_promo_banner"),i="payments_terminals_title_header"):(show("payments_getvotes_ps"),i="payments_ps_list_title_header"),cur.paymentsWideBox&&(hide(i),ge("payments_getvotes_title").innerHTML=ge(i).innerText),PaymentsBox.setButtons(!1,!1,cur.paymentsChangeType,PaymentsBox.showTypes),!cur.paymentsWideBox)return}for(var a=["payments_getvotes_ps",cur.paymentsWideBox?"payments_box_menu":"payments_getvotes_method"],s=0;s<a.length;s++){var c=a[s];if(!(!(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)(c)||cur.paymentsWideBox&&!n||"payments_box_menu"===c&&(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_ps")&&n&&hasClass(n.parentNode,"payments_getvotes_ps_list"))){var l=ge(c),u=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("payments_getvotes_active_row",l);if(!e&&u.length&&!cur.paymentsWideBox)return;u.forEach((e=>{removeClass(e,"payments_getvotes_active_row"),cur.paymentsWideBox&&!o&&removeClass(e,"payments_progress")}))}}if(n&&(!cur.paymentsWideBox||"payments_box_menu"!==n.parentNode.id||o||e||addClass(n,"payments_progress"),addClass(n,"payments_getvotes_active_row")),cur.paymentsWideBox&&cur.paymentsWaitingCache[t])return ge("payments_getvotes_title").innerHTML=cur.paymentsWaitingCache[t][0],ge("payments_getvotes_waiting").innerHTML=cur.paymentsWaitingCache[t][1],PaymentsBox.refreshBox(),show("payments_getvotes_waiting","payments_getvotes_title"),hide("payments_getvotes_buttons"),void PaymentsBox.hideRowProgress();if(!o){(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.isVisible)("payments_getvotes_buttons")&&!cur.paymentsWideBox&&(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.lockButton)("payments_getvotes_submit");var d={act:"a_getvotes_amounts",type:cur.votesType,prefer_votes:cur.paymentsPreferVotes,hash:cur.paymentsHash};if(cur.statSessionId&&(d.stat_session_id=cur.statSessionId),cur.isPaymentsAppOrder&&cur.paymentsOrderAppId&&(d.aid=cur.paymentsOrderAppId,cur.paymentsOrderBillPeriod&&(d.bill_period=cur.paymentsOrderBillPeriod),cur.paymentsOrderDiscount&&(d.discount=cur.paymentsOrderDiscount)),"sms"===d.type)cur.checkedMaxVotes&&(d.checked_max_votes=cur.checkedMaxVotes,cur.checkedMaxVotes=0),cur.newSmsPhone&&(d.phone=cur.newSmsPhone,cur.newSmsPhone=!1),cur.isCorpPhone&&(d.corp=cur.isCorpPhone,cur.isCorpPhone=!1);else if("offers"===d.type){if(cur.app&&cur.app.options&&(d.isAppOrder=cur.paymentsOfferApp?1:0,d.aid=cur.app.options.aid,d.orderBox=cur.isPaymentsAppOrder?1:0),cur.paymentsPreload)return PaymentsBox.getVotesAmountsOnDone.apply(this,cur.paymentsPreload),cur.paymentsPreload=!1,void(cur.paymentsOfferPreload&&(PaymentsBox.offerOnLoad.apply(this,cur.paymentsOfferPreload),cur.paymentsOfferPreload=!1,cur.paymentsOneOffer=!0))}else if("spasibo"===d.type)cur.newSmsPhone&&(d.phone=cur.newSmsPhone,cur.newSmsPhone=!1),cur.needContinue&&(d.continue=1,cur.needContinue=0);else if(cur.psList[d.type]&&cur.psList[d.type].simple_redirect)return PaymentsBox.hideRowProgress(),void PaymentsBox.submitPaymentSystem();ajax.post("al_payments.php",d,{onDone:PaymentsBox.getVotesAmountsOnDone,onFail:e=>(PaymentsBox.showBoxError(e),!0)})}}}static getVotesAmountsOnDone(result,html,data,js,title){if(PaymentsBox.hideRowProgress(),(0,_web_lib_ui__WEBPACK_IMPORTED_MODULE_6__.unlockButton)("payments_getvotes_submit"),cur.paymentsWideBox&&(title&&(val("payments_getvotes_title",title),show("payments_getvotes_title")),data&&data.menu_money)){var sumWrap=ge("payments_summary_bill");sumWrap?sumWrap.innerHTML=data.menu_money:val(`payments_method_${cur.votesType}_descr`,data.menu_money)}if(hide("payments_votes_vkpay_promo_banner"),-1!=result)if(-2!=result)if(-3!=result){if(!result)return PaymentsBox.showProgress(""),void(cur.smsAmountsInt=setTimeout((()=>{PaymentsBox.getVotesAmounts(!0)}),1e3));if(html){var other;if(2==result?(other=ge("payments_getvotes_other"),val(other,html)):val("payments_getvotes_cont",html),cur.votesAmountsData=data,(cur.fromInstantPay&&2==cur.votesAmountsData.confirm_type||2!=cur.votesAmountsData.confirm_type||!cur.votesAmountsData.checked_max_sms_votes_val)&&PaymentsBox.showVotesAmounts(),cur.paymentsPreload&&"offers"===cur.votesType?PaymentsBox.setButtons(!1):"offers"===cur.votesType?PaymentsBox.setButtons(!1,!1,cur.paymentsChangeType,PaymentsBox.showTypes):cur.paymentsPreload&&PaymentsBox.setButtons(cur.payments_get_votes,PaymentsBox.showConfirm),window.radioBtns.payments_getvotes_amounts={els:Array.prototype.slice.apply((0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("radiobtn",ge("payments_getvotes_amounts")))},data.confirm_msg&&data.confirm_type&&val("payments_getvotes_confirm_msg",data.confirm_msg),2==result&&(hide("payments_getvotes_wrap"),show(other)),js)try{eval(js)}catch(e){(0,_web_lib_debug_tools__WEBPACK_IMPORTED_MODULE_14__.logEvalError)(e,js)}cur.instantNeedCVV&&(PaymentsBox.showConfirm(),cur.instantNeedCVV=!1),cur.paymentsEmailInput=ge("payments_receipt_email"),cur.paymentsEmailCheckbox=!!cur.paymentsEmailInput&&geByClass1("_checkbox",(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.domPN)(cur.paymentsEmailInput))}}else{var rows=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("payments_getvotes_method_opt","payments_box_menu");hide(geByClass1("payments_getvotes_active_row","payments_box_menu"));for(var i=0;i<rows.length;i++){var row=rows[i];if(!hasClass(row,"payments_getvotes_active_row")){row.onclick();break}}}else PaymentsBox.showPhoneForm(!1,html);else PaymentsBox.showPhoneForm()}static popupHtml(e,t,n){return`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\n<head>\n    <meta http-equiv="content-type" content="text/html; charset=windows-1251" />\n    <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n    <style>\n        body {font-family:tahoma,verdana,arial,sans-serif,Lucida Sans; font-size:11px;}\n        .text {position:relative; top:40%; text-align:center; line-height:24px;}\n        .text img {margin-bottom:8px;}\n        .text_container {position:absolute; top:0; left:0; right:0; bottom:0; line-height:150%; height: 100%;}\n    </style>\n    <script type="text/javascript">\n      if (!window.vk) window.vk = {loginscheme: '${vk.loginscheme}', ip_h: '${vk.ip_h}', __domain: '${(0,_shared_lib_site__WEBPACK_IMPORTED_MODULE_20__.getHostName)()}'};\n    <\/script>\n    <script type="text/javascript" src="/dist/workers/payments.js"><\/script>\n</head>\n<body>\n${t}\n<div id="wait_text_container" class="text_container">\n    <div class="text">\n        <img src="/images/progress.gif" /><br/>${e}\n    </div>\n</div>\n<script type="text/javascript">\n  var st = setTimeout(function() {try {${n}; clearTimeout(st)} catch(e) {}}, 100)\n<\/script>\n</body>\n</html>`}static viewOffer(e){this.setButtons(e,(()=>{ge("start_offer").submit(),PaymentsBox.setButtons(getLang("payments_back_to_offers_list"),PaymentsBox.backToOffersList,getLang("global_cancel"),PaymentsBox.backToOffersList)}),getLang("global_cancel"),PaymentsBox.backToOffersList)}static backToOffersList(){if(cur.paymentsOneOffer)return(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)().hide();hide("payments_offer_view"),show("payments_offers_list"),cur.votesTypeInit||!1===cur.votesTypeInit?PaymentsBox.setButtons(!1):PaymentsBox.setButtons(!1,!1,cur.paymentsChangeType,PaymentsBox.showTypes)}static initializeOfferChecker(e,t,n,r){cur.offersOffset=e,cur.offersAppCurrency=t,PaymentsBox.checkOffersList=[],PaymentsBox.checkOffersDo=()=>{if(!n){var e=PaymentsBox.checkOffersList.join(",");PaymentsBox.checkOffersList=[],ajax.post("al_payments.php",{act:"a_offers_stat",offers:e,hash:r}),PaymentsBox.checkOffersTO=!1}},PaymentsBox.checkOffers(),addEvent(ge("box_layer_wrap"),"scroll",PaymentsBox.checkOffers)}static removeCheckOffersEvent(){removeEvent(ge("box_layer_wrap"),"scroll",PaymentsBox.checkOffers)}static checkOffers(){var e=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("payments_offer",ge("payments_offers_wrap")),t=ge("box_layer_wrap").scrollTop,n=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.getSize)("box_layer_wrap")[1];e.forEach((e=>{var r=e,o=r.offsetTop;o+30<t+n&&o+(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.getSize)(r)[1]-20>t&&!r.getAttribute("checked")&&(r.setAttribute("checked",1),PaymentsBox.checkOffersList.push(r.id.substr(15)),PaymentsBox.checkOffersTO||(PaymentsBox.checkOffersTO=setTimeout(PaymentsBox.checkOffersDo,1e3)))}))}static offersRemoveButtons(){cur.votesTypeInit?PaymentsBox.setButtons(!1):PaymentsBox.setButtons(cur.paymentsChangeType,PaymentsBox.showTypes,getLang("global_close"),(0,_web_lib_box_utils__WEBPACK_IMPORTED_MODULE_5__.curBox)().hide)}static disablePaymentTypesRows(){var e=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("payments_getvotes_method_opt");if(e&&e.length>0)for(var t=0;t<e.length;t++){var n=e[t];n.classList.contains("payments_getvotes_active_row")?n.classList.add("payments_getvotes_noevents_row"):n.classList.add("payments_getvotes_disabled_row","payments_getvotes_noevents_row")}}static enablePaymentTypesRows(){var e=(0,_web_lib_dom__WEBPACK_IMPORTED_MODULE_4__.geByClass)("payments_getvotes_method_opt");if(e&&e.length>0)for(var t=0;t<e.length;t++)e[t].classList.remove("payments_getvotes_disabled_row","payments_getvotes_noevents_row")}static handlePaymentCompleteMessage(e){e.origin==window.origin&&e.data.type&&"paymentCompleteMessage"===e.data.type&&window.PaymentsBox.complete(e.data.newUrl,e.data.params)}}},391789:(e,t,n)=>{"use strict";n.d(t,{getPhotoData:()=>r,getCurrentPhoto:()=>o,setPhotoData:()=>i,dropPhotoCacheData:()=>a,getIndexedFriends:()=>s,setIndexedFriends:()=>c,isImgBlurred:()=>l});n(751876);function r(e){var t=cur.pvListId,n=cur.pvIndex;if(cur.pvData&&t&&!isNaN(n)){var r=cur.pvData[t][n];return e?r[e]:r}return!1}function o(){var e=cur.pvListId,t=cur.pvIndex;return cur.pvData&&e&&!isNaN(t)?cur.pvData[e][t]:null}function i(e,t){var n=cur.pvListId,r=cur.pvIndex;return!(!cur.pvData||!n||isNaN(r))&&(cur.pvData[n][r][e]=t,cur.pvData[n][r])}function a(){delete cur.pvList,delete cur.pvData}function s(){return cur.pvIndexedFriends}function c(e,t){cur.pvIndexedFriends=new vkIndexer(e,(e=>e[1]),t)}function l(e){if(!e)return!1;var t=e.photoRaw?e.photoRaw.split("_")[0]:"";return!(!e.restrictionBlur||cur.unblurredPhotos&&cur.unblurredPhotos.indexOf(e.photoRaw)>-1||cur.unblurredOwners&&cur.unblurredOwners.indexOf(t)>-1)}},473166:(e,t,n)=>{"use strict";n.d(t,{initSettingsAddressBox:()=>c});n(751876);var r=n(315544),o=n(49535),i=n(376852),a=n(386409),s=n(124041);function c(e){var t=document.querySelector("#settdbx_addr"),n=document.querySelector("#settdbx_addr_tt_place");t.onfocus=function(){-2===cur.addrChecked&&(0,i.showTooltip)(n,{text:getLang("settings_addrbox_hint"),dir:"left",slideX:15,className:"settings_pwd_tt",shift:[-12,-15,0],onCreate:function(){(0,o.removeEvent)(n,"mouseout")}})},t.onblur=function(){n.tt&&n.tt.hide()},(0,r.elfocus)(t),setTimeout(r.elfocus.pbind(t),100),(0,r.setStyle)(t,{width:230-ge("settdbx_base").offsetWidth-8}),extend(cur,{settDomainCheckAddress:function(e){clearTimeout(cur.addressCheckTO),cur.lastAddress!==(0,r.val)("settdbx_addr")&&(cur.addressCheckTO=setTimeout(cur.settDomainDoCheckAddress,e||0))},settDomainDoCheckAddress:function(){var e=document.querySelector("#settdbx_submit"),n=document.querySelector("#settdbx_advices");cur.lastAddress=(0,r.val)("settdbx_addr"),ajax.post("al_settings.php",{act:"a_check_address",name:cur.lastAddress,from:"box"},{onDone:function(t){cur.addrChecked=1,s.FlatButton.setLabel(e,t),s.FlatButton.setDisabled(e,!1),(0,r.val)(n,"")},onFail:function(o){var i=(o=o.split("<*>"))[1],a=o[2];return o=o[0],a?(cur.addrChecked=-2,t.onfocus()):(cur.addrChecked=-1,t.onblur()),s.FlatButton.setLabel(e,o),s.FlatButton.setDisabled(e,!0),(0,r.val)(n,i),!0}})},settDomainAdvisedAddress:function(e){(0,r.val)("settdbx_addr",e),cur.settDomainCheckAddress()},settDomainAddressSubmit:function(t){if(1===cur.addrChecked){var n=(0,r.val)("settdbx_addr"),o={act:"a_change_address",hash:e,name:n};s.FlatButton.lock(t),window.ajax.post("al_settings.php",o,{onDone:function(e){nav.go(n,!1,{params:{from:"address_box"}})},showProgress:()=>s.FlatButton.lock(t),hideProgress:()=>s.FlatButton.unlock(t)})}else(0,a.notaBene)("settings_addr")}})}},619143:(e,t,n)=>{"use strict";n.d(t,{showNextPaymentsHistory:()=>i});n(530522);var r=n(386409),o=n(315544),i=(e,t)=>{var n,i;if(!(0,r.isButtonLocked)(e))return(0,r.lockButton)(e),t||(t="votes"),void 0===cur.historyOffset[t]&&(cur.historyOffset[t]=5),"transfer"===t?(n={act:"a_transfer_history"},i=(0,o.ge)("settings_transfer_history")):"subscriptions"===t?(n={act:"a_payments_subsciptions"},i=(0,o.ge)("settings_payments_subscriptions")):"games"===t?(n={act:"a_payments_games"},i=(0,o.ge)("settings_payments_games")):(n={act:"a_votes_history"},i=(0,o.ge)("settings_votes_history")),n.offset=i.rows.length,"subscriptions"===t&&(n.extra_items_count=cur.historyExtraItemsSubscriptions),ajax.post("al_settings.php",n,{onDone:function(n,a,s){var c=i.tBodies[0];if(n){if((0,r.unlockButton)(e),browser.msie){var l=(0,o.se)("<table>"+n+"</table>");Array.from((0,o.geByTag)("tr",l)).forEach((e=>{1===e.nodeType&&c.appendChild(e)}))}else c.insertAdjacentHTML("beforeEnd",n);"subscriptions"===t&&s&&(cur.historyExtraItemsSubscriptions=s)}n&&!a||((0,o.addClass)(c.lastChild,"settings_votes_history_last"),(0,o.hide)(e))}}),!1}},7739:(e,t,n)=>{"use strict";n.d(t,{FAQTutorial:()=>l});var r=n(315544),o=n(468770),i=n(386409),a="tutorial_step",s="finished";function c(){var e=geByClass(a).slice(-1)[0],t=geByClass1("content",e);t.innerHTML=getTemplate("login_tutorial_finish_appeal")+t.innerHTML}var l={tryInit(){geByClass1(a)&&c()},select(e,t,n){var l=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!cur.tutorialProcessing&&!isChecked(e)){var u=gpeByClass(a,e);hasClass(u,s)||(removeClass(geByClass1("on",u),"on"),addClass(e,"on"),ajax.post("support?act=a_select_tutorial",{name:t,id:n,load:1,ban:nav.objLoc.ban||0},{onDone(e,t){l||addClass(u,s);var n,i=!0,a=ge("page_body").offsetHeight+(vk.staticheader?0:(0,r.getH)(ge("page_header_cont")));if(l)do{(n=domNS(u))&&(re(n),i=!1)}while(n);if(ge("login_blocked_wrap").innerHTML+=e,c(),"login"===nav.objLoc[0]&&t){var d=document.querySelectorAll(".tutorial_step"),_=d[d.length-1];if(o.Login.isBanExpired()){o.Login.canUnblockFast()?_.innerHTML+=getTemplate("login_unblock_by_phone_fast"):_.innerHTML+=getTemplate("login_unblock_by_phone");var p=d[d.length-1].querySelector(".help_table_question__m");p&&hide(p)}else _.innerHTML+=getTemplate("login_wait_for_ban_expiration_message")}i&&scrollToY(a)},onFail:e=>(showDoneBox(e),!1),showProgress(){cur.tutorialProcessing=!0,(0,i.lockButton)(e)},hideProgress(){cur.tutorialProcessing=!1,(0,i.unlockButton)(e)}}))}},home:()=>{nav.go("/support?act=home")},back:e=>{var t=geByClass("tutorial_step"),n=t[t.length-1];2===t.length&&hide(e),hide(n),removeClass(geByClass1("on",t[t.length-2]),"on")}}},141454:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EMPTY:()=>r,UNSTARTED:()=>o,PLAYING:()=>i,PAUSED:()=>a,ENDED:()=>s,ERROR:()=>c});var r="empty",o="unstarted",i="playing",a="paused",s="ended",c="error"},889366:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});n(175115),n(95767),n(991181),n(296253);var r=n(667294),o=(n(45697),n(659397));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}class s extends r.Component{constructor(e){super(e),this.onChange=e=>{this.isControlledOutside||this.setState({value:e.target.value}),this.props.onChange&&this.props.onChange(e)},this.getRef=e=>{this.element=e},this.onFocus=e=>{this.props.onFocus&&this.props.onFocus(e)},void 0!==e.value||e.isControlledOutside?this.isControlledOutside=!0:this.state={value:e.initialValue||""}}render(){var e=this.props,t=e.alignment,n=e.value,s=(e.onChange,e.initialValue,e.className),c=(e.isControlledOutside,a(e,["alignment","value","onChange","initialValue","className","isControlledOutside"])),l={"Input--left":"left"===t,"Input--center":"center"===t,"Input--right":"right"===t};return r.createElement("input",i({},c,{className:(0,o.classNames)("Input",l,s),ref:this.getRef,value:this.isControlledOutside?n:this.state.value,onChange:this.onChange,onFocus:this.onFocus}))}}s.defaultProps={type:"text",initialValue:"",alignment:"left"}},439664:(e,t,n)=>{"use strict";n.d(t,{default:()=>i});n(991181),n(66108),n(296253);var r=n(667294),o=(n(45697),n(659397));class i extends r.Component{constructor(e){super(e),this.id=Math.round(1e6*Math.random()).toString(16),this.setSpinnerParams(e)}UNSAFE_componentWillReceiveProps(e){this.setSpinnerParams(e)}setSpinnerParams(e){this.offset=Math.round(Math.PI*e.size),this.c=.5*e.size,this.animation=function(e,t){if(!e||!t)return"";var n=Object.keys(t).map((e=>e+" {"+Object.keys(t[e]).map((n=>n+":"+t[e][n])).join(";")+"}")).join("");return`@-webkit-keyframes ${e} {${n}} @keyframes ${e} {${n}}`}("dash"+this.id,{"0%":{"stroke-dashoffset":this.offset},"50%":{"stroke-dashoffset":Math.round(.25*this.offset),transform:"rotate(135deg)"},"100%":{"stroke-dashoffset":this.offset,transform:"rotate(360deg)"}})}render(){var e=this.props,t=e.style,n=e.color,i=void 0===n?"var(--icon_secondary)":n,a=e.size,s=e.duration,c=e.strokeWidth,l=e.className,u=this.id,d=this.offset,_=this.animation,p=(0,o.classNames)("Spinner",l);return r.createElement("div",{className:p,style:t},r.createElement("svg",{className:"Spinner__svg",width:a,height:a,viewBox:`0 0 ${a} ${a}`,xmlns:"http://www.w3.org/2000/svg"},r.createElement("g",{style:{width:a,height:a,transformOrigin:.5*a+"px "+.5*a+"px"}},r.createElement("style",{dangerouslySetInnerHTML:{__html:_}}),r.createElement("circle",{className:"Spinner__path",fill:"none",stroke:i,strokeDasharray:d,strokeDashoffset:d,strokeWidth:c,style:{animationName:"dash"+u,animationTimingFunction:"ease-in-out",animationDuration:s+"s",animationIterationCount:"infinite"},cx:.5*a,cy:.5*a,r:.5*a-.5*c}))))}}i.defaultProps={color:"#5181b8",size:19,strokeWidth:2,duration:1.4,className:""}},224736:(e,t,n)=>{var r;e=n.nmd(e);var o=function(e){"use strict";var t=1e7,n=9007199254740992,r=_(n),i="0123456789abcdefghijklmnopqrstuvwxyz",a="function"==typeof BigInt;function s(e,t,n,r){return void 0===e?s[0]:void 0!==t&&(10!=+t||n)?K(e,t,n,r):$(e)}function c(e,t){this.value=e,this.sign=t,this.isSmall=!1}function l(e){this.value=e,this.sign=e<0,this.isSmall=!0}function u(e){this.value=e}function d(e){return-n<e&&e<n}function _(e){return e<1e7?[e]:e<1e14?[e%1e7,Math.floor(e/1e7)]:[e%1e7,Math.floor(e/1e7)%1e7,Math.floor(e/1e14)]}function p(e){h(e);var n=e.length;if(n<4&&I(e,r)<0)switch(n){case 0:return 0;case 1:return e[0];case 2:return e[0]+e[1]*t;default:return e[0]+(e[1]+e[2]*t)*t}return e}function h(e){for(var t=e.length;0===e[--t];);e.length=t+1}function f(e){for(var t=new Array(e),n=-1;++n<e;)t[n]=0;return t}function m(e){return e>0?Math.floor(e):Math.ceil(e)}function v(e,n){var r,o,i=e.length,a=n.length,s=new Array(i),c=0,l=t;for(o=0;o<a;o++)c=(r=e[o]+n[o]+c)>=l?1:0,s[o]=r-c*l;for(;o<i;)c=(r=e[o]+c)===l?1:0,s[o++]=r-c*l;return c>0&&s.push(c),s}function g(e,t){return e.length>=t.length?v(e,t):v(t,e)}function y(e,n){var r,o,i=e.length,a=new Array(i),s=t;for(o=0;o<i;o++)r=e[o]-s+n,n=Math.floor(r/s),a[o]=r-n*s,n+=1;for(;n>0;)a[o++]=n%s,n=Math.floor(n/s);return a}function E(e,n){var r,o,i=e.length,a=n.length,s=new Array(i),c=0,l=t;for(r=0;r<a;r++)(o=e[r]-c-n[r])<0?(o+=l,c=1):c=0,s[r]=o;for(r=a;r<i;r++){if(!((o=e[r]-c)<0)){s[r++]=o;break}o+=l,s[r]=o}for(;r<i;r++)s[r]=e[r];return h(s),s}function w(e,n,r){var o,i,a=e.length,s=new Array(a),u=-n,d=t;for(o=0;o<a;o++)i=e[o]+u,u=Math.floor(i/d),i%=d,s[o]=i<0?i+d:i;return"number"==typeof(s=p(s))?(r&&(s=-s),new l(s)):new c(s,r)}function b(e,n){var r,o,i,a,s=e.length,c=n.length,l=f(s+c),u=t;for(i=0;i<s;++i){a=e[i];for(var d=0;d<c;++d)r=a*n[d]+l[i+d],o=Math.floor(r/u),l[i+d]=r-o*u,l[i+d+1]+=o}return h(l),l}function C(e,n){var r,o,i=e.length,a=new Array(i),s=t,c=0;for(o=0;o<i;o++)r=e[o]*n+c,c=Math.floor(r/s),a[o]=r-c*s;for(;c>0;)a[o++]=c%s,c=Math.floor(c/s);return a}function S(e,t){for(var n=[];t-- >0;)n.push(0);return n.concat(e)}function T(e,t){var n=Math.max(e.length,t.length);if(n<=30)return b(e,t);n=Math.ceil(n/2);var r=e.slice(n),o=e.slice(0,n),i=t.slice(n),a=t.slice(0,n),s=T(o,a),c=T(r,i),l=T(g(o,r),g(a,i)),u=g(g(s,S(E(E(l,s),c),n)),S(c,2*n));return h(u),u}function A(e,n,r){return new c(e<t?C(n,e):b(n,_(e)),r)}function D(e){var n,r,o,i,a=e.length,s=f(a+a),c=t;for(o=0;o<a;o++){r=0-(i=e[o])*i;for(var l=o;l<a;l++)n=i*e[l]*2+s[o+l]+r,r=Math.floor(n/c),s[o+l]=n-r*c;s[o+a]=r}return h(s),s}function P(e,t){var n,r,o,i,a=e.length,s=f(a);for(o=0,n=a-1;n>=0;--n)o=(i=1e7*o+e[n])-(r=m(i/t))*t,s[n]=0|r;return[s,0|o]}function O(e,n){var r,o=$(n);if(a)return[new u(e.value/o.value),new u(e.value%o.value)];var i,d=e.value,v=o.value;if(0===v)throw new Error("Cannot divide by zero");if(e.isSmall)return o.isSmall?[new l(m(d/v)),new l(d%v)]:[s[0],e];if(o.isSmall){if(1===v)return[e,s[0]];if(-1==v)return[e.negate(),s[0]];var g=Math.abs(v);if(g<t){i=p((r=P(d,g))[0]);var y=r[1];return e.sign&&(y=-y),"number"==typeof i?(e.sign!==o.sign&&(i=-i),[new l(i),new l(y)]):[new c(i,e.sign!==o.sign),new l(y)]}v=_(g)}var w=I(d,v);if(-1===w)return[s[0],e];if(0===w)return[s[e.sign===o.sign?1:-1],s[0]];r=d.length+v.length<=200?function(e,n){var r,o,i,a,s,c,l,u=e.length,d=n.length,_=t,h=f(n.length),m=n[d-1],v=Math.ceil(_/(2*m)),g=C(e,v),y=C(n,v);for(g.length<=u&&g.push(0),y.push(0),m=y[d-1],o=u-d;o>=0;o--){for(r=_-1,g[o+d]!==m&&(r=Math.floor((g[o+d]*_+g[o+d-1])/m)),i=0,a=0,c=y.length,s=0;s<c;s++)i+=r*y[s],l=Math.floor(i/_),a+=g[o+s]-(i-l*_),i=l,a<0?(g[o+s]=a+_,a=-1):(g[o+s]=a,a=0);for(;0!==a;){for(r-=1,i=0,s=0;s<c;s++)(i+=g[o+s]-_+y[s])<0?(g[o+s]=i+_,i=0):(g[o+s]=i,i=1);a+=i}h[o]=r}return g=P(g,v)[0],[p(h),p(g)]}(d,v):function(e,n){for(var r,o,i,a,s,c=e.length,l=n.length,u=[],d=[],_=t;c;)if(d.unshift(e[--c]),h(d),I(d,n)<0)u.push(0);else{i=d[(o=d.length)-1]*_+d[o-2],a=n[l-1]*_+n[l-2],o>l&&(i=(i+1)*_),r=Math.ceil(i/a);do{if(I(s=C(n,r),d)<=0)break;r--}while(r);u.push(r),d=E(d,s)}return u.reverse(),[p(u),p(d)]}(d,v),i=r[0];var b=e.sign!==o.sign,S=r[1],T=e.sign;return"number"==typeof i?(b&&(i=-i),i=new l(i)):i=new c(i,b),"number"==typeof S?(T&&(S=-S),S=new l(S)):S=new c(S,T),[i,S]}function I(e,t){if(e.length!==t.length)return e.length>t.length?1:-1;for(var n=e.length-1;n>=0;n--)if(e[n]!==t[n])return e[n]>t[n]?1:-1;return 0}function k(e){var t=e.abs();return!t.isUnit()&&(!!(t.equals(2)||t.equals(3)||t.equals(5))||!(t.isEven()||t.isDivisibleBy(3)||t.isDivisibleBy(5))&&(!!t.lesser(49)||void 0))}function R(e,t){for(var n,r,i,a=e.prev(),s=a,c=0;s.isEven();)s=s.divide(2),c++;e:for(r=0;r<t.length;r++)if(!e.lesser(t[r])&&!(i=o(t[r]).modPow(s,e)).isUnit()&&!i.equals(a)){for(n=c-1;0!=n;n--){if((i=i.square().mod(e)).isUnit())return!1;if(i.equals(a))continue e}return!1}return!0}c.prototype=Object.create(s.prototype),l.prototype=Object.create(s.prototype),u.prototype=Object.create(s.prototype),c.prototype.add=function(e){var t=$(e);if(this.sign!==t.sign)return this.subtract(t.negate());var n=this.value,r=t.value;return t.isSmall?new c(y(n,Math.abs(r)),this.sign):new c(g(n,r),this.sign)},c.prototype.plus=c.prototype.add,l.prototype.add=function(e){var t=$(e),n=this.value;if(n<0!==t.sign)return this.subtract(t.negate());var r=t.value;if(t.isSmall){if(d(n+r))return new l(n+r);r=_(Math.abs(r))}return new c(y(r,Math.abs(n)),n<0)},l.prototype.plus=l.prototype.add,u.prototype.add=function(e){return new u(this.value+$(e).value)},u.prototype.plus=u.prototype.add,c.prototype.subtract=function(e){var t=$(e);if(this.sign!==t.sign)return this.add(t.negate());var n=this.value,r=t.value;return t.isSmall?w(n,Math.abs(r),this.sign):function(e,t,n){var r;return I(e,t)>=0?r=E(e,t):(r=E(t,e),n=!n),"number"==typeof(r=p(r))?(n&&(r=-r),new l(r)):new c(r,n)}(n,r,this.sign)},c.prototype.minus=c.prototype.subtract,l.prototype.subtract=function(e){var t=$(e),n=this.value;if(n<0!==t.sign)return this.add(t.negate());var r=t.value;return t.isSmall?new l(n-r):w(r,Math.abs(n),n>=0)},l.prototype.minus=l.prototype.subtract,u.prototype.subtract=function(e){return new u(this.value-$(e).value)},u.prototype.minus=u.prototype.subtract,c.prototype.negate=function(){return new c(this.value,!this.sign)},l.prototype.negate=function(){var e=this.sign,t=new l(-this.value);return t.sign=!e,t},u.prototype.negate=function(){return new u(-this.value)},c.prototype.abs=function(){return new c(this.value,!1)},l.prototype.abs=function(){return new l(Math.abs(this.value))},u.prototype.abs=function(){return new u(this.value>=0?this.value:-this.value)},c.prototype.multiply=function(e){var n,r,o,i=$(e),a=this.value,l=i.value,u=this.sign!==i.sign;if(i.isSmall){if(0===l)return s[0];if(1===l)return this;if(-1===l)return this.negate();if((n=Math.abs(l))<t)return new c(C(a,n),u);l=_(n)}return r=a.length,o=l.length,new c(-.012*r-.012*o+15e-6*r*o>0?T(a,l):b(a,l),u)},c.prototype.times=c.prototype.multiply,l.prototype._multiplyBySmall=function(e){return d(e.value*this.value)?new l(e.value*this.value):A(Math.abs(e.value),_(Math.abs(this.value)),this.sign!==e.sign)},c.prototype._multiplyBySmall=function(e){return 0===e.value?s[0]:1===e.value?this:-1===e.value?this.negate():A(Math.abs(e.value),this.value,this.sign!==e.sign)},l.prototype.multiply=function(e){return $(e)._multiplyBySmall(this)},l.prototype.times=l.prototype.multiply,u.prototype.multiply=function(e){return new u(this.value*$(e).value)},u.prototype.times=u.prototype.multiply,c.prototype.square=function(){return new c(D(this.value),!1)},l.prototype.square=function(){var e=this.value*this.value;return d(e)?new l(e):new c(D(_(Math.abs(this.value))),!1)},u.prototype.square=function(e){return new u(this.value*this.value)},c.prototype.divmod=function(e){var t=O(this,e);return{quotient:t[0],remainder:t[1]}},u.prototype.divmod=l.prototype.divmod=c.prototype.divmod,c.prototype.divide=function(e){return O(this,e)[0]},u.prototype.over=u.prototype.divide=function(e){return new u(this.value/$(e).value)},l.prototype.over=l.prototype.divide=c.prototype.over=c.prototype.divide,c.prototype.mod=function(e){return O(this,e)[1]},u.prototype.mod=u.prototype.remainder=function(e){return new u(this.value%$(e).value)},l.prototype.remainder=l.prototype.mod=c.prototype.remainder=c.prototype.mod,c.prototype.pow=function(e){var t,n,r,o=$(e),i=this.value,a=o.value;if(0===a)return s[1];if(0===i)return s[0];if(1===i)return s[1];if(-1===i)return o.isEven()?s[1]:s[-1];if(o.sign)return s[0];if(!o.isSmall)throw new Error("The exponent "+o.toString()+" is too large.");if(this.isSmall&&d(t=Math.pow(i,a)))return new l(m(t));for(n=this,r=s[1];!0&a&&(r=r.times(n),--a),0!==a;)a/=2,n=n.square();return r},l.prototype.pow=c.prototype.pow,u.prototype.pow=function(e){var t=$(e),n=this.value,r=t.value,o=BigInt(0),i=BigInt(1),a=BigInt(2);if(r===o)return s[1];if(n===o)return s[0];if(n===i)return s[1];if(n===BigInt(-1))return t.isEven()?s[1]:s[-1];if(t.isNegative())return new u(o);for(var c=this,l=s[1];(r&i)===i&&(l=l.times(c),--r),r!==o;)r/=a,c=c.square();return l},c.prototype.modPow=function(e,t){if(e=$(e),(t=$(t)).isZero())throw new Error("Cannot take modPow with modulus 0");var n=s[1],r=this.mod(t);for(e.isNegative()&&(e=e.multiply(s[-1]),r=r.modInv(t));e.isPositive();){if(r.isZero())return s[0];e.isOdd()&&(n=n.multiply(r).mod(t)),e=e.divide(2),r=r.square().mod(t)}return n},u.prototype.modPow=l.prototype.modPow=c.prototype.modPow,c.prototype.compareAbs=function(e){var t=$(e),n=this.value,r=t.value;return t.isSmall?1:I(n,r)},l.prototype.compareAbs=function(e){var t=$(e),n=Math.abs(this.value),r=t.value;return t.isSmall?n===(r=Math.abs(r))?0:n>r?1:-1:-1},u.prototype.compareAbs=function(e){var t=this.value,n=$(e).value;return(t=t>=0?t:-t)===(n=n>=0?n:-n)?0:t>n?1:-1},c.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=$(e),n=this.value,r=t.value;return this.sign!==t.sign?t.sign?1:-1:t.isSmall?this.sign?-1:1:I(n,r)*(this.sign?-1:1)},c.prototype.compareTo=c.prototype.compare,l.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=$(e),n=this.value,r=t.value;return t.isSmall?n==r?0:n>r?1:-1:n<0!==t.sign?n<0?-1:1:n<0?1:-1},l.prototype.compareTo=l.prototype.compare,u.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var t=this.value,n=$(e).value;return t===n?0:t>n?1:-1},u.prototype.compareTo=u.prototype.compare,c.prototype.equals=function(e){return 0===this.compare(e)},u.prototype.eq=u.prototype.equals=l.prototype.eq=l.prototype.equals=c.prototype.eq=c.prototype.equals,c.prototype.notEquals=function(e){return 0!==this.compare(e)},u.prototype.neq=u.prototype.notEquals=l.prototype.neq=l.prototype.notEquals=c.prototype.neq=c.prototype.notEquals,c.prototype.greater=function(e){return this.compare(e)>0},u.prototype.gt=u.prototype.greater=l.prototype.gt=l.prototype.greater=c.prototype.gt=c.prototype.greater,c.prototype.lesser=function(e){return this.compare(e)<0},u.prototype.lt=u.prototype.lesser=l.prototype.lt=l.prototype.lesser=c.prototype.lt=c.prototype.lesser,c.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},u.prototype.geq=u.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals=c.prototype.geq=c.prototype.greaterOrEquals,c.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},u.prototype.leq=u.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals=c.prototype.leq=c.prototype.lesserOrEquals,c.prototype.isEven=function(){return 0==(1&this.value[0])},l.prototype.isEven=function(){return 0==(1&this.value)},u.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},c.prototype.isOdd=function(){return 1==(1&this.value[0])},l.prototype.isOdd=function(){return 1==(1&this.value)},u.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},c.prototype.isPositive=function(){return!this.sign},l.prototype.isPositive=function(){return this.value>0},u.prototype.isPositive=l.prototype.isPositive,c.prototype.isNegative=function(){return this.sign},l.prototype.isNegative=function(){return this.value<0},u.prototype.isNegative=l.prototype.isNegative,c.prototype.isUnit=function(){return!1},l.prototype.isUnit=function(){return 1===Math.abs(this.value)},u.prototype.isUnit=function(){return this.abs().value===BigInt(1)},c.prototype.isZero=function(){return!1},l.prototype.isZero=function(){return 0===this.value},u.prototype.isZero=function(){return this.value===BigInt(0)},c.prototype.isDivisibleBy=function(e){var t=$(e);return!t.isZero()&&(!!t.isUnit()||(0===t.compareAbs(2)?this.isEven():this.mod(t).isZero()))},u.prototype.isDivisibleBy=l.prototype.isDivisibleBy=c.prototype.isDivisibleBy,c.prototype.isPrime=function(t){var n=k(this);if(n!==e)return n;var r=this.abs(),i=r.bitLength();if(i<=64)return R(r,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var a=Math.log(2)*i.toJSNumber(),s=Math.ceil(!0===t?2*Math.pow(a,2):a),c=[],l=0;l<s;l++)c.push(o(l+2));return R(r,c)},u.prototype.isPrime=l.prototype.isPrime=c.prototype.isPrime,c.prototype.isProbablePrime=function(t,n){var r=k(this);if(r!==e)return r;for(var i=this.abs(),a=t===e?5:t,s=[],c=0;c<a;c++)s.push(o.randBetween(2,i.minus(2),n));return R(i,s)},u.prototype.isProbablePrime=l.prototype.isProbablePrime=c.prototype.isProbablePrime,c.prototype.modInv=function(e){for(var t,n,r,i=o.zero,a=o.one,s=$(e),c=this.abs();!c.isZero();)t=s.divide(c),n=i,r=s,i=a,s=c,a=n.subtract(t.multiply(a)),c=r.subtract(t.multiply(c));if(!s.isUnit())throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===i.compare(0)&&(i=i.add(e)),this.isNegative()?i.negate():i},u.prototype.modInv=l.prototype.modInv=c.prototype.modInv,c.prototype.next=function(){var e=this.value;return this.sign?w(e,1,this.sign):new c(y(e,1),this.sign)},l.prototype.next=function(){var e=this.value;return e+1<n?new l(e+1):new c(r,!1)},u.prototype.next=function(){return new u(this.value+BigInt(1))},c.prototype.prev=function(){var e=this.value;return this.sign?new c(y(e,1),!0):w(e,1,this.sign)},l.prototype.prev=function(){var e=this.value;return e-1>-n?new l(e-1):new c(r,!0)},u.prototype.prev=function(){return new u(this.value-BigInt(1))};for(var M=[1];2*M[M.length-1]<=t;)M.push(2*M[M.length-1]);var L=M.length,x=M[L-1];function N(e){return Math.abs(e)<=t}function B(e,t,n){t=$(t);for(var r=e.isNegative(),i=t.isNegative(),a=r?e.not():e,s=i?t.not():t,c=0,l=0,u=null,d=null,_=[];!a.isZero()||!s.isZero();)c=(u=O(a,x))[1].toJSNumber(),r&&(c=x-1-c),l=(d=O(s,x))[1].toJSNumber(),i&&(l=x-1-l),a=u[0],s=d[0],_.push(n(c,l));for(var p=0!==n(r?1:0,i?1:0)?o(-1):o(0),h=_.length-1;h>=0;h-=1)p=p.multiply(x).add(o(_[h]));return p}c.prototype.shiftLeft=function(e){var t=$(e).toJSNumber();if(!N(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftRight(-t);var n=this;if(n.isZero())return n;for(;t>=L;)n=n.multiply(x),t-=L-1;return n.multiply(M[t])},u.prototype.shiftLeft=l.prototype.shiftLeft=c.prototype.shiftLeft,c.prototype.shiftRight=function(e){var t,n=$(e).toJSNumber();if(!N(n))throw new Error(String(n)+" is too large for shifting.");if(n<0)return this.shiftLeft(-n);for(var r=this;n>=L;){if(r.isZero()||r.isNegative()&&r.isUnit())return r;r=(t=O(r,x))[1].isNegative()?t[0].prev():t[0],n-=L-1}return(t=O(r,M[n]))[1].isNegative()?t[0].prev():t[0]},u.prototype.shiftRight=l.prototype.shiftRight=c.prototype.shiftRight,c.prototype.not=function(){return this.negate().prev()},u.prototype.not=l.prototype.not=c.prototype.not,c.prototype.and=function(e){return B(this,e,(function(e,t){return e&t}))},u.prototype.and=l.prototype.and=c.prototype.and,c.prototype.or=function(e){return B(this,e,(function(e,t){return e|t}))},u.prototype.or=l.prototype.or=c.prototype.or,c.prototype.xor=function(e){return B(this,e,(function(e,t){return e^t}))},u.prototype.xor=l.prototype.xor=c.prototype.xor;var U=1<<30;function F(e){var n=e.value,r="number"==typeof n?n|U:"bigint"==typeof n?n|BigInt(U):n[0]+n[1]*t|1073758208;return r&-r}function W(e,t){if(t.compareTo(e)<=0){var n=W(e,t.square(t)),r=n.p,i=n.e,a=r.multiply(t);return a.compareTo(e)<=0?{p:a,e:2*i+1}:{p:r,e:2*i}}return{p:o(1),e:0}}function V(e,t){return e=$(e),t=$(t),e.greater(t)?e:t}function H(e,t){return e=$(e),t=$(t),e.lesser(t)?e:t}function j(e,t){if(e=$(e).abs(),t=$(t).abs(),e.equals(t))return e;if(e.isZero())return t;if(t.isZero())return e;for(var n,r,o=s[1];e.isEven()&&t.isEven();)n=H(F(e),F(t)),e=e.divide(n),t=t.divide(n),o=o.multiply(n);for(;e.isEven();)e=e.divide(F(e));do{for(;t.isEven();)t=t.divide(F(t));e.greater(t)&&(r=t,t=e,e=r),t=t.subtract(e)}while(!t.isZero());return o.isUnit()?e:e.multiply(o)}c.prototype.bitLength=function(){var e=this;return e.compareTo(o(0))<0&&(e=e.negate().subtract(o(1))),0===e.compareTo(o(0))?o(0):o(W(e,o(2)).e).add(o(1))},u.prototype.bitLength=l.prototype.bitLength=c.prototype.bitLength;var K=function(e,t,n,r){n=n||i,e=String(e),r||(e=e.toLowerCase(),n=n.toLowerCase());var o,a=e.length,s=Math.abs(t),c={};for(o=0;o<n.length;o++)c[n[o]]=o;for(o=0;o<a;o++){if("-"!==(d=e[o])&&(d in c&&c[d]>=s)){if("1"===d&&1===s)continue;throw new Error(d+" is not a valid digit in base "+t+".")}}t=$(t);var l=[],u="-"===e[0];for(o=u?1:0;o<e.length;o++){var d;if((d=e[o])in c)l.push($(c[d]));else{if("<"!==d)throw new Error(d+" is not a valid character");var _=o;do{o++}while(">"!==e[o]&&o<e.length);l.push($(e.slice(_+1,o)))}}return z(l,t,u)};function z(e,t,n){var r,o=s[0],i=s[1];for(r=e.length-1;r>=0;r--)o=o.add(e[r].times(i)),i=i.times(t);return n?o.negate():o}function G(e,t){if((t=o(t)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(t.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var n=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return n.unshift([1]),{value:[].concat.apply([],n),isNegative:!1}}var r=!1;if(e.isNegative()&&t.isPositive()&&(r=!0,e=e.abs()),t.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:r};for(var i,a=[],s=e;s.isNegative()||s.compareAbs(t)>=0;){i=s.divmod(t),s=i.quotient;var c=i.remainder;c.isNegative()&&(c=t.minus(c).abs(),s=s.next()),a.push(c.toJSNumber())}return a.push(s.toJSNumber()),{value:a.reverse(),isNegative:r}}function q(e,t,n){var r=G(e,t);return(r.isNegative?"-":"")+r.value.map((function(e){return function(e,t){return e<(t=t||i).length?t[e]:"<"+e+">"}(e,n)})).join("")}function Y(e){if(d(+e)){var t=+e;if(t===m(t))return a?new u(BigInt(t)):new l(t);throw new Error("Invalid integer: "+e)}var n="-"===e[0];n&&(e=e.slice(1));var r=e.split(/e/i);if(r.length>2)throw new Error("Invalid integer: "+r.join("e"));if(2===r.length){var o=r[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==m(o)||!d(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var i=r[0],s=i.indexOf(".");if(s>=0&&(o-=i.length-s-1,i=i.slice(0,s)+i.slice(s+1)),o<0)throw new Error("Cannot include negative exponent part for integers");e=i+=new Array(o+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(a)return new u(BigInt(n?"-"+e:e));for(var _=[],p=e.length,f=p-7;p>0;)_.push(+e.slice(f,p)),(f-=7)<0&&(f=0),p-=7;return h(_),new c(_,n)}function $(e){return"number"==typeof e?function(e){if(a)return new u(BigInt(e));if(d(e)){if(e!==m(e))throw new Error(e+" is not an integer.");return new l(e)}return Y(e.toString())}(e):"string"==typeof e?Y(e):"bigint"==typeof e?new u(e):e}c.prototype.toArray=function(e){return G(this,e)},l.prototype.toArray=function(e){return G(this,e)},u.prototype.toArray=function(e){return G(this,e)},c.prototype.toString=function(t,n){if(t===e&&(t=10),10!==t)return q(this,t,n);for(var r,o=this.value,i=o.length,a=String(o[--i]);--i>=0;)r=String(o[i]),a+="0000000".slice(r.length)+r;return(this.sign?"-":"")+a},l.prototype.toString=function(t,n){return t===e&&(t=10),10!=t?q(this,t,n):String(this.value)},u.prototype.toString=l.prototype.toString,u.prototype.toJSON=c.prototype.toJSON=l.prototype.toJSON=function(){return this.toString()},c.prototype.valueOf=function(){return parseInt(this.toString(),10)},c.prototype.toJSNumber=c.prototype.valueOf,l.prototype.valueOf=function(){return this.value},l.prototype.toJSNumber=l.prototype.valueOf,u.prototype.valueOf=u.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var X=0;X<1e3;X++)s[X]=$(X),X>0&&(s[-X]=$(-X));return s.one=s[1],s.zero=s[0],s.minusOne=s[-1],s.max=V,s.min=H,s.gcd=j,s.lcm=function(e,t){return e=$(e).abs(),t=$(t).abs(),e.divide(j(e,t)).multiply(t)},s.isInstance=function(e){return e instanceof c||e instanceof l||e instanceof u},s.randBetween=function(e,n,r){e=$(e),n=$(n);var o=r||Math.random,i=H(e,n),a=V(e,n).subtract(i).add(1);if(a.isSmall)return i.add(Math.floor(o()*a));for(var c=G(a,t).value,l=[],u=!0,d=0;d<c.length;d++){var _=u?c[d]:t,p=m(o()*_);l.push(p),p<_&&(u=!1)}return i.add(s.fromArray(l,t,!1))},s.fromArray=function(e,t,n){return z(e.map($),$(t||10),n)},s}();e.hasOwnProperty("exports")&&(e.exports=o),void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)},538797:function(e,t,n){var r;!function(o){var i=function(e,t,n){if(!(e instanceof ArrayBuffer||"undefined"!=typeof Buffer&&e instanceof Buffer))throw new Error("Must specify a valid ArrayBuffer or Buffer.");t=t||0,n=n||e.byteLength||e.length,this._view=new Uint8Array(e.buffer||e,t,n),this.bigEndian=!1};i._scratch=new DataView(new ArrayBuffer(8)),Object.defineProperty(i.prototype,"buffer",{get:function(){return"undefined"!=typeof Buffer?Buffer.from(this._view.buffer):this._view.buffer},enumerable:!0,configurable:!1}),Object.defineProperty(i.prototype,"byteLength",{get:function(){return this._view.length},enumerable:!0,configurable:!1}),i.prototype._setBit=function(e,t){t?this._view[e>>3]|=1<<(7&e):this._view[e>>3]&=~(1<<(7&e))},i.prototype.getBits=function(e,t,n){var r=8*this._view.length-e;if(t>r)throw new Error("Cannot get "+t+" bit(s) from offset "+e+", "+r+" available");for(var o=0,i=0;i<t;){var a=t-i,s=7&e,c=this._view[e>>3],l=Math.min(a,8-s);this.bigEndian?(o<<=l,o|=c>>8-l-s&~(255<<l)):o|=(c>>s&~(255<<l))<<i,e+=l,i+=l}return n?(32!==t&&o&1<<t-1&&(o|=-1^(1<<t)-1),o):o>>>0},i.prototype.setBits=function(e,t,n){var r=8*this._view.length-e;if(n>r)throw new Error("Cannot set "+n+" bit(s) from offset "+e+", "+r+" available");for(var o=0;o<n;){var i,a,s,c=n-o,l=7&e,u=e>>3,d=Math.min(c,8-l);if(this.bigEndian){a=t>>n-o-d&(i=~(-1<<d));var _=8-l-d;s=~(i<<_),this._view[u]=this._view[u]&s|a<<_}else a=t&(i=~(255<<d)),t>>=d,s=~(i<<l),this._view[u]=this._view[u]&s|a<<l;e+=d,o+=d}},i.prototype.getBoolean=function(e){return 0!==this.getBits(e,1,!1)},i.prototype.getInt8=function(e){return this.getBits(e,8,!0)},i.prototype.getUint8=function(e){return this.getBits(e,8,!1)},i.prototype.getInt16=function(e){return this.getBits(e,16,!0)},i.prototype.getUint16=function(e){return this.getBits(e,16,!1)},i.prototype.getInt32=function(e){return this.getBits(e,32,!0)},i.prototype.getUint32=function(e){return this.getBits(e,32,!1)},i.prototype.getFloat32=function(e){return i._scratch.setUint32(0,this.getUint32(e)),i._scratch.getFloat32(0)},i.prototype.getFloat64=function(e){return i._scratch.setUint32(0,this.getUint32(e)),i._scratch.setUint32(4,this.getUint32(e+32)),i._scratch.getFloat64(0)},i.prototype.setBoolean=function(e,t){this.setBits(e,t?1:0,1)},i.prototype.setInt8=i.prototype.setUint8=function(e,t){this.setBits(e,t,8)},i.prototype.setInt16=i.prototype.setUint16=function(e,t){this.setBits(e,t,16)},i.prototype.setInt32=i.prototype.setUint32=function(e,t){this.setBits(e,t,32)},i.prototype.setFloat32=function(e,t){i._scratch.setFloat32(0,t),this.setBits(e,i._scratch.getUint32(0),32)},i.prototype.setFloat64=function(e,t){i._scratch.setFloat64(0,t),this.setBits(e,i._scratch.getUint32(0),32),this.setBits(e+32,i._scratch.getUint32(4),32)},i.prototype.getArrayBuffer=function(e,t){for(var n=new Uint8Array(t),r=0;r<t;r++)n[r]=this.getUint8(e+8*r);return n};var a=function(e,t){return function(){if(this._index+t>this._length)throw new Error("Trying to read past the end of the stream");var n=this._view[e](this._index);return this._index+=t,n}},s=function(e,t){return function(n){this._view[e](this._index,n),this._index+=t}};function c(e,t,n){if(0===t)return"";var r=0,o=[],i=!0,a=!!t;for(t||(t=Math.floor((e._length-e._index)/8));r<t;){var s=e.readUint8();if(0===s&&(i=!1,!a))break;i&&o.push(s),r++}var c=String.fromCharCode.apply(null,o);if(!n)return c;try{return decodeURIComponent(escape(c))}catch(e){return c}}var l=function(e,t,n){var r=e instanceof ArrayBuffer||"undefined"!=typeof Buffer&&e instanceof Buffer;if(!(e instanceof i||r))throw new Error("Must specify a valid BitView, ArrayBuffer or Buffer");this._view=r?new i(e,t,n):e,this._index=0,this._startIndex=0,this._length=8*this._view.byteLength};Object.defineProperty(l.prototype,"index",{get:function(){return this._index-this._startIndex},set:function(e){this._index=e+this._startIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"length",{get:function(){return this._length-this._startIndex},set:function(e){this._length=e+this._startIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"bitsLeft",{get:function(){return this._length-this._index},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"byteIndex",{get:function(){return Math.ceil(this._index/8)},set:function(e){this._index=8*e},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._view.buffer},enumerable:!0,configurable:!1}),Object.defineProperty(l.prototype,"view",{get:function(){return this._view},enumerable:!0,configurable:!1}),Object.defineProperty(l.prototype,"bigEndian",{get:function(){return this._view.bigEndian},set:function(e){this._view.bigEndian=e},enumerable:!0,configurable:!1}),l.prototype.readBits=function(e,t){var n=this._view.getBits(this._index,e,t);return this._index+=e,n},l.prototype.writeBits=function(e,t){this._view.setBits(this._index,e,t),this._index+=t},l.prototype.readBoolean=a("getBoolean",1),l.prototype.readInt8=a("getInt8",8),l.prototype.readUint8=a("getUint8",8),l.prototype.readInt16=a("getInt16",16),l.prototype.readUint16=a("getUint16",16),l.prototype.readInt32=a("getInt32",32),l.prototype.readUint32=a("getUint32",32),l.prototype.readFloat32=a("getFloat32",32),l.prototype.readFloat64=a("getFloat64",64),l.prototype.writeBoolean=s("setBoolean",1),l.prototype.writeInt8=s("setInt8",8),l.prototype.writeUint8=s("setUint8",8),l.prototype.writeInt16=s("setInt16",16),l.prototype.writeUint16=s("setUint16",16),l.prototype.writeInt32=s("setInt32",32),l.prototype.writeUint32=s("setUint32",32),l.prototype.writeFloat32=s("setFloat32",32),l.prototype.writeFloat64=s("setFloat64",64),l.prototype.readASCIIString=function(e){return function(e,t){return c(e,t,!1)}(this,e)},l.prototype.readUTF8String=function(e){return function(e,t){return c(e,t,!0)}(this,e)},l.prototype.writeASCIIString=function(e,t){!function(e,t,n){for(var r=n||t.length+1,o=0;o<r;o++)e.writeUint8(o<t.length?t.charCodeAt(o):0)}(this,e,t)},l.prototype.writeUTF8String=function(e,t){!function(e,t,n){for(var r=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(n=e.charCodeAt(t))<=127?r.push(n):n<=2047?(r.push(n>>6|192),r.push(63&n|128)):n<=65535?(r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)):(r.push(n>>18|240),r.push(n>>12&63|128),r.push(n>>6&63|128),r.push(63&n|128));return r}(t),o=n||r.length+1,i=0;i<o;i++)e.writeUint8(i<r.length?r[i]:0)}(this,e,t)},l.prototype.readBitStream=function(e){var t=new l(this._view);return t._startIndex=this._index,t._index=this._index,t.length=e,this._index+=e,t},l.prototype.writeBitStream=function(e,t){var n;for(t||(t=e.bitsLeft);t>0;)n=Math.min(t,32),this.writeBits(e.readBits(n),n),t-=n},l.prototype.readArrayBuffer=function(e){var t=this._view.getArrayBuffer(this._index,e);return this._index+=8*e,t},l.prototype.writeArrayBuffer=function(e,t){this.writeBitStream(new l(e),8*t)},void 0===(r=function(){return{BitView:i,BitStream:l}}.call(t,n,t,e))||(e.exports=r)}()},528120:(e,t,n)=>{n(209865),n(731898),n(825645).Promise},124963:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},617722:(e,t,n)=>{var r=n(286314)("unscopables"),o=Array.prototype;null==o[r]&&n(87728)(o,r,{}),e.exports=function(e){o[r][e]=!0}},376793:(e,t,n)=>{"use strict";var r=n(224496)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},83328:e=>{e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},627007:(e,t,n)=>{var r=n(755286);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},205216:(e,t,n)=>{"use strict";var r=n(820508),o=n(592337),i=n(410875);e.exports=[].copyWithin||function(e,t){var n=r(this),a=i(n.length),s=o(e,a),c=o(t,a),l=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===l?a:o(l,a))-c,a-s),d=1;for(c<s&&s<c+u&&(d=-1,c+=u-1,s+=u-1);u-- >0;)c in n?n[s]=n[c]:delete n[s],s+=d,c+=d;return n}},846852:(e,t,n)=>{"use strict";var r=n(820508),o=n(592337),i=n(410875);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,l=void 0===c?n:o(c,n);l>s;)t[s++]=e;return t}},879315:(e,t,n)=>{var r=n(922110),o=n(410875),i=n(592337);e.exports=function(e){return function(t,n,a){var s,c=r(t),l=o(c.length),u=i(a,l);if(e&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}}},310050:(e,t,n)=>{var r=n(500741),o=n(149797),i=n(820508),a=n(410875),s=n(716886);e.exports=function(e,t){var n=1==e,c=2==e,l=3==e,u=4==e,d=6==e,_=5==e||d,p=t||s;return function(t,s,h){for(var f,m,v=i(t),g=o(v),y=r(s,h,3),E=a(g.length),w=0,b=n?p(t,E):c?p(t,0):void 0;E>w;w++)if((_||w in g)&&(m=y(f=g[w],w,v),e))if(n)b[w]=m;else if(m)switch(e){case 3:return!0;case 5:return f;case 6:return w;case 2:b.push(f)}else if(u)return!1;return d?-1:l||u?u:b}}},842736:(e,t,n)=>{var r=n(755286),o=n(904302),i=n(286314)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},716886:(e,t,n)=>{var r=n(842736);e.exports=function(e,t){return new(r(e))(t)}},341488:(e,t,n)=>{var r=n(492032),o=n(286314)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},492032:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},825645:e=>{var t=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=t)},592811:(e,t,n)=>{"use strict";var r=n(99275),o=n(990681);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},500741:(e,t,n)=>{var r=n(124963);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},291355:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},867057:(e,t,n)=>{e.exports=!n(574253)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},862457:(e,t,n)=>{var r=n(755286),o=n(803816).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},674430:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},505541:(e,t,n)=>{var r=n(647184),o=n(764548),i=n(14682);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,s=n(e),c=i.f,l=0;s.length>l;)c.call(e,a=s[l++])&&t.push(a);return t}},542985:(e,t,n)=>{var r=n(803816),o=n(825645),i=n(87728),a=n(277234),s=n(500741),c=function(e,t,n){var l,u,d,_,p=e&c.F,h=e&c.G,f=e&c.S,m=e&c.P,v=e&c.B,g=h?r:f?r[t]||(r[t]={}):(r[t]||{}).prototype,y=h?o:o[t]||(o[t]={}),E=y.prototype||(y.prototype={});for(l in h&&(n=t),n)d=((u=!p&&g&&void 0!==g[l])?g:n)[l],_=v&&u?s(d,r):m&&"function"==typeof d?s(Function.call,d):d,g&&a(g,l,d,e&c.U),y[l]!=d&&i(y,l,_),m&&E[l]!=d&&(E[l]=d)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},574253:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},528082:(e,t,n)=>{"use strict";n(118269);var r=n(277234),o=n(87728),i=n(574253),a=n(291355),s=n(286314),c=n(121165),l=s("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var _=s(e),p=!i((function(){var t={};return t[_]=function(){return 7},7!=""[e](t)})),h=p?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[l]=function(){return n}),n[_](""),!t})):void 0;if(!p||!h||"replace"===e&&!u||"split"===e&&!d){var f=/./[_],m=n(a,_,""[e],(function(e,t,n,r,o){return t.exec===c?p&&!o?{done:!0,value:f.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=m[0],g=m[1];r(String.prototype,e,v),o(RegExp.prototype,_,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},753218:(e,t,n)=>{"use strict";var r=n(627007);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},803531:(e,t,n)=>{var r=n(500741),o=n(928851),i=n(386555),a=n(627007),s=n(410875),c=n(969002),l={},u={},d=e.exports=function(e,t,n,d,_){var p,h,f,m,v=_?function(){return e}:c(e),g=r(n,d,t?2:1),y=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(i(v)){for(p=s(e.length);p>y;y++)if((m=t?g(a(h=e[y])[0],h[1]):g(e[y]))===l||m===u)return m}else for(f=v.call(e);!(h=f.next()).done;)if((m=o(f,g,h.value,t))===l||m===u)return m};d.BREAK=l,d.RETURN=u},540018:(e,t,n)=>{e.exports=n(103825)("native-function-to-string",Function.toString)},803816:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},479181:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},87728:(e,t,n)=>{var r=n(99275),o=n(990681);e.exports=n(867057)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},240639:(e,t,n)=>{var r=n(803816).document;e.exports=r&&r.documentElement},101734:(e,t,n)=>{e.exports=!n(867057)&&!n(574253)((function(){return 7!=Object.defineProperty(n(862457)("div"),"a",{get:function(){return 7}}).a}))},640266:(e,t,n)=>{var r=n(755286),o=n(527375).set;e.exports=function(e,t,n){var i,a=t.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(e,i),e}},997242:e=>{e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},149797:(e,t,n)=>{var r=n(492032);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},386555:(e,t,n)=>{var r=n(487234),o=n(286314)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},904302:(e,t,n)=>{var r=n(492032);e.exports=Array.isArray||function(e){return"Array"==r(e)}},755286:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},355364:(e,t,n)=>{var r=n(755286),o=n(492032),i=n(286314)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},928851:(e,t,n)=>{var r=n(627007);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},249988:(e,t,n)=>{"use strict";var r=n(342503),o=n(990681),i=n(222943),a={};n(87728)(a,n(286314)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},142923:(e,t,n)=>{"use strict";var r=n(4461),o=n(542985),i=n(277234),a=n(87728),s=n(487234),c=n(249988),l=n(222943),u=n(500468),d=n(286314)("iterator"),_=!([].keys&&"next"in[].keys()),p="keys",h="values",f=function(){return this};e.exports=function(e,t,n,m,v,g,y){c(n,t,m);var E,w,b,C=function(e){if(!_&&e in D)return D[e];switch(e){case p:case h:return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",T=v==h,A=!1,D=e.prototype,P=D[d]||D["@@iterator"]||v&&D[v],O=P||C(v),I=v?T?C("entries"):O:void 0,k="Array"==t&&D.entries||P;if(k&&(b=u(k.call(new e)))!==Object.prototype&&b.next&&(l(b,S,!0),r||"function"==typeof b[d]||a(b,d,f)),T&&P&&P.name!==h&&(A=!0,O=function(){return P.call(this)}),r&&!y||!_&&!A&&D[d]||a(D,d,O),s[t]=O,s[S]=f,v)if(E={values:T?O:C(h),keys:g?O:C(p),entries:I},y)for(w in E)w in D||i(D,w,E[w]);else o(o.P+o.F*(_||A),t,E);return E}},307462:(e,t,n)=>{var r=n(286314)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},715436:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},487234:e=>{e.exports={}},4461:e=>{e.exports=!1},484728:(e,t,n)=>{var r=n(693953)("meta"),o=n(755286),i=n(479181),a=n(99275).f,s=0,c=Object.isExtensible||function(){return!0},l=!n(574253)((function(){return c(Object.preventExtensions({}))})),u=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!c(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!i(e,r)){if(!c(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return l&&d.NEED&&c(e)&&!i(e,r)&&u(e),e}}},714351:(e,t,n)=>{var r=n(803816),o=n(574193).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n(492032)(a);e.exports=function(){var e,t,n,l=function(){var r,o;for(c&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(l)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(l)}}else n=function(){o.call(r,l)};else{var d=!0,_=document.createTextNode("");new i(l).observe(_,{characterData:!0}),n=function(){_.data=d=!d}}return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},543499:(e,t,n)=>{"use strict";var r=n(124963);function o(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new o(e)}},35345:(e,t,n)=>{"use strict";var r=n(867057),o=n(647184),i=n(764548),a=n(14682),s=n(820508),c=n(149797),l=Object.assign;e.exports=!l||n(574253)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=s(e),l=arguments.length,u=1,d=i.f,_=a.f;l>u;)for(var p,h=c(arguments[u++]),f=d?o(h).concat(d(h)):o(h),m=f.length,v=0;m>v;)p=f[v++],r&&!_.call(h,p)||(n[p]=h[p]);return n}:l},342503:(e,t,n)=>{var r=n(627007),o=n(335588),i=n(674430),a=n(569335)("IE_PROTO"),s=function(){},c=function(){var e,t=n(862457)("iframe"),r=i.length;for(t.style.display="none",n(240639).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c.prototype[i[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=c(),void 0===t?n:o(n,t)}},99275:(e,t,n)=>{var r=n(627007),o=n(101734),i=n(121689),a=Object.defineProperty;t.f=n(867057)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},335588:(e,t,n)=>{var r=n(99275),o=n(627007),i=n(647184);e.exports=n(867057)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),s=a.length,c=0;s>c;)r.f(e,n=a[c++],t[n]);return e}},518693:(e,t,n)=>{var r=n(14682),o=n(990681),i=n(922110),a=n(121689),s=n(479181),c=n(101734),l=Object.getOwnPropertyDescriptor;t.f=n(867057)?l:function(e,t){if(e=i(e),t=a(t,!0),c)try{return l(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},639327:(e,t,n)=>{var r=n(922110),o=n(320616).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},320616:(e,t,n)=>{var r=n(160189),o=n(674430).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},764548:(e,t)=>{t.f=Object.getOwnPropertySymbols},500468:(e,t,n)=>{var r=n(479181),o=n(820508),i=n(569335)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},160189:(e,t,n)=>{var r=n(479181),o=n(922110),i=n(879315)(!1),a=n(569335)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),c=0,l=[];for(n in s)n!=a&&r(s,n)&&l.push(n);for(;t.length>c;)r(s,n=t[c++])&&(~i(l,n)||l.push(n));return l}},647184:(e,t,n)=>{var r=n(160189),o=n(674430);e.exports=Object.keys||function(e){return r(e,o)}},14682:(e,t)=>{t.f={}.propertyIsEnumerable},551131:(e,t,n)=>{var r=n(867057),o=n(647184),i=n(922110),a=n(14682).f;e.exports=function(e){return function(t){for(var n,s=i(t),c=o(s),l=c.length,u=0,d=[];l>u;)n=c[u++],r&&!a.call(s,n)||d.push(e?[n,s[n]]:s[n]);return d}}},110188:e=>{e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},750094:(e,t,n)=>{var r=n(627007),o=n(755286),i=n(543499);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},990681:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},424408:(e,t,n)=>{var r=n(277234);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},277234:(e,t,n)=>{var r=n(803816),o=n(87728),i=n(479181),a=n(693953)("src"),s=n(540018),c="toString",l=(""+s).split(c);n(825645).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(c&&(i(n,a)||o(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,c,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},827787:(e,t,n)=>{"use strict";var r=n(341488),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},121165:(e,t,n)=>{"use strict";var r,o,i=n(753218),a=RegExp.prototype.exec,s=String.prototype.replace,c=a,l=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),u=void 0!==/()??/.exec("")[1];(l||u)&&(c=function(e){var t,n,r,o,c=this;return u&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),l&&(t=c.lastIndex),r=a.call(c,e),l&&r&&(c.lastIndex=c.global?r.index+r[0].length:t),u&&r&&r.length>1&&s.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=c},227195:e=>{e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},527375:(e,t,n)=>{var r=n(755286),o=n(627007),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(500741)(Function.call,n(518693).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},102974:(e,t,n)=>{"use strict";var r=n(803816),o=n(99275),i=n(867057),a=n(286314)("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},222943:(e,t,n)=>{var r=n(99275).f,o=n(479181),i=n(286314)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},569335:(e,t,n)=>{var r=n(103825)("keys"),o=n(693953);e.exports=function(e){return r[e]||(r[e]=o(e))}},103825:(e,t,n)=>{var r=n(825645),o=n(803816),i="__core-js_shared__",a=o[i]||(o[i]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(4461)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},158364:(e,t,n)=>{var r=n(627007),o=n(124963),i=n(286314)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[i])?t:o(n)}},577717:(e,t,n)=>{"use strict";var r=n(574253);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},224496:(e,t,n)=>{var r=n(781467),o=n(291355);e.exports=function(e){return function(t,n){var i,a,s=String(o(t)),c=r(n),l=s.length;return c<0||c>=l?e?"":void 0:(i=s.charCodeAt(c))<55296||i>56319||c+1===l||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):i:e?s.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},574193:(e,t,n)=>{var r,o,i,a=n(500741),s=n(997242),c=n(240639),l=n(862457),u=n(803816),d=u.process,_=u.setImmediate,p=u.clearImmediate,h=u.MessageChannel,f=u.Dispatch,m=0,v={},g="onreadystatechange",y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},E=function(e){y.call(e.data)};_&&p||(_=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},p=function(e){delete v[e]},"process"==n(492032)(d)?r=function(e){d.nextTick(a(y,e,1))}:f&&f.now?r=function(e){f.now(a(y,e,1))}:h?(i=(o=new h).port2,o.port1.onmessage=E,r=a(i.postMessage,i,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(e){u.postMessage(e+"","*")},u.addEventListener("message",E,!1)):r=g in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:_,clear:p}},592337:(e,t,n)=>{var r=n(781467),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},494843:(e,t,n)=>{var r=n(781467),o=n(410875);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw RangeError("Wrong length!");return n}},781467:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},922110:(e,t,n)=>{var r=n(149797),o=n(291355);e.exports=function(e){return r(o(e))}},410875:(e,t,n)=>{var r=n(781467),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},820508:(e,t,n)=>{var r=n(291355);e.exports=function(e){return Object(r(e))}},121689:(e,t,n)=>{var r=n(755286);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},778440:(e,t,n)=>{"use strict";if(n(867057)){var r=n(4461),o=n(803816),i=n(574253),a=n(542985),s=n(889383),c=n(791125),l=n(500741),u=n(83328),d=n(990681),_=n(87728),p=n(424408),h=n(781467),f=n(410875),m=n(494843),v=n(592337),g=n(121689),y=n(479181),E=n(341488),w=n(755286),b=n(820508),C=n(386555),S=n(342503),T=n(500468),A=n(320616).f,D=n(969002),P=n(693953),O=n(286314),I=n(310050),k=n(879315),R=n(158364),M=n(856997),L=n(487234),x=n(307462),N=n(102974),B=n(846852),U=n(205216),F=n(99275),W=n(518693),V=F.f,H=W.f,j=o.RangeError,K=o.TypeError,z=o.Uint8Array,G="ArrayBuffer",q="SharedArrayBuffer",Y="BYTES_PER_ELEMENT",$=Array.prototype,X=c.ArrayBuffer,Q=c.DataView,J=I(0),Z=I(2),ee=I(3),te=I(4),ne=I(5),re=I(6),oe=k(!0),ie=k(!1),ae=M.values,se=M.keys,ce=M.entries,le=$.lastIndexOf,ue=$.reduce,de=$.reduceRight,_e=$.join,pe=$.sort,he=$.slice,fe=$.toString,me=$.toLocaleString,ve=O("iterator"),ge=O("toStringTag"),ye=P("typed_constructor"),Ee=P("def_constructor"),we=s.CONSTR,be=s.TYPED,Ce=s.VIEW,Se="Wrong length!",Te=I(1,(function(e,t){return Ie(R(e,e[Ee]),t)})),Ae=i((function(){return 1===new z(new Uint16Array([1]).buffer)[0]})),De=!!z&&!!z.prototype.set&&i((function(){new z(1).set({})})),Pe=function(e,t){var n=h(e);if(n<0||n%t)throw j("Wrong offset!");return n},Oe=function(e){if(w(e)&&be in e)return e;throw K(e+" is not a typed array!")},Ie=function(e,t){if(!w(e)||!(ye in e))throw K("It is not a typed array constructor!");return new e(t)},ke=function(e,t){return Re(R(e,e[Ee]),t)},Re=function(e,t){for(var n=0,r=t.length,o=Ie(e,r);r>n;)o[n]=t[n++];return o},Me=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Le=function(e){var t,n,r,o,i,a,s=b(e),c=arguments.length,u=c>1?arguments[1]:void 0,d=void 0!==u,_=D(s);if(null!=_&&!C(_)){for(a=_.call(s),r=[],t=0;!(i=a.next()).done;t++)r.push(i.value);s=r}for(d&&c>2&&(u=l(u,arguments[2],2)),t=0,n=f(s.length),o=Ie(this,n);n>t;t++)o[t]=d?u(s[t],t):s[t];return o},xe=function(){for(var e=0,t=arguments.length,n=Ie(this,t);t>e;)n[e]=arguments[e++];return n},Ne=!!z&&i((function(){me.call(new z(1))})),Be=function(){return me.apply(Ne?he.call(Oe(this)):Oe(this),arguments)},Ue={copyWithin:function(e,t){return U.call(Oe(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return te(Oe(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return B.apply(Oe(this),arguments)},filter:function(e){return ke(this,Z(Oe(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ne(Oe(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return re(Oe(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){J(Oe(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ie(Oe(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Oe(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return _e.apply(Oe(this),arguments)},lastIndexOf:function(e){return le.apply(Oe(this),arguments)},map:function(e){return Te(Oe(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return ue.apply(Oe(this),arguments)},reduceRight:function(e){return de.apply(Oe(this),arguments)},reverse:function(){for(var e,t=this,n=Oe(t).length,r=Math.floor(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t},some:function(e){return ee(Oe(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return pe.call(Oe(this),e)},subarray:function(e,t){var n=Oe(this),r=n.length,o=v(e,r);return new(R(n,n[Ee]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,f((void 0===t?r:v(t,r))-o))}},Fe=function(e,t){return ke(this,he.call(Oe(this),e,t))},We=function(e){Oe(this);var t=Pe(arguments[1],1),n=this.length,r=b(e),o=f(r.length),i=0;if(o+t>n)throw j(Se);for(;i<o;)this[t+i]=r[i++]},Ve={entries:function(){return ce.call(Oe(this))},keys:function(){return se.call(Oe(this))},values:function(){return ae.call(Oe(this))}},He=function(e,t){return w(e)&&e[be]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},je=function(e,t){return He(e,t=g(t,!0))?d(2,e[t]):H(e,t)},Ke=function(e,t,n){return!(He(e,t=g(t,!0))&&w(n)&&y(n,"value"))||y(n,"get")||y(n,"set")||n.configurable||y(n,"writable")&&!n.writable||y(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};we||(W.f=je,F.f=Ke),a(a.S+a.F*!we,"Object",{getOwnPropertyDescriptor:je,defineProperty:Ke}),i((function(){fe.call({})}))&&(fe=me=function(){return _e.call(this)});var ze=p({},Ue);p(ze,Ve),_(ze,ve,Ve.values),p(ze,{slice:Fe,set:We,constructor:function(){},toString:fe,toLocaleString:Be}),Me(ze,"buffer","b"),Me(ze,"byteOffset","o"),Me(ze,"byteLength","l"),Me(ze,"length","e"),V(ze,ge,{get:function(){return this[be]}}),e.exports=function(e,t,n,c){var l=e+((c=!!c)?"Clamped":"")+"Array",d="get"+e,p="set"+e,h=o[l],v=h||{},g=h&&T(h),y=!h||!s.ABV,b={},C=h&&h.prototype,D=function(e,n){V(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[d](n*t+r.o,Ae)}(this,n)},set:function(e){return function(e,n,r){var o=e._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[p](n*t+o.o,r,Ae)}(this,n,e)},enumerable:!0})};y?(h=n((function(e,n,r,o){u(e,h,l,"_d");var i,a,s,c,d=0,p=0;if(w(n)){if(!(n instanceof X||(c=E(n))==G||c==q))return be in n?Re(h,n):Le.call(h,n);i=n,p=Pe(r,t);var v=n.byteLength;if(void 0===o){if(v%t)throw j(Se);if((a=v-p)<0)throw j(Se)}else if((a=f(o)*t)+p>v)throw j(Se);s=a/t}else s=m(n),i=new X(a=s*t);for(_(e,"_d",{b:i,o:p,l:a,e:s,v:new Q(i)});d<s;)D(e,d++)})),C=h.prototype=S(ze),_(C,"constructor",h)):i((function(){h(1)}))&&i((function(){new h(-1)}))&&x((function(e){new h,new h(null),new h(1.5),new h(e)}),!0)||(h=n((function(e,n,r,o){var i;return u(e,h,l),w(n)?n instanceof X||(i=E(n))==G||i==q?void 0!==o?new v(n,Pe(r,t),o):void 0!==r?new v(n,Pe(r,t)):new v(n):be in n?Re(h,n):Le.call(h,n):new v(m(n))})),J(g!==Function.prototype?A(v).concat(A(g)):A(v),(function(e){e in h||_(h,e,v[e])})),h.prototype=C,r||(C.constructor=h));var P=C[ve],O=!!P&&("values"==P.name||null==P.name),I=Ve.values;_(h,ye,!0),_(C,be,l),_(C,Ce,!0),_(C,Ee,h),(c?new h(1)[ge]==l:ge in C)||V(C,ge,{get:function(){return l}}),b[l]=h,a(a.G+a.W+a.F*(h!=v),b),a(a.S,l,{BYTES_PER_ELEMENT:t}),a(a.S+a.F*i((function(){v.of.call(h,1)})),l,{from:Le,of:xe}),Y in C||_(C,Y,t),a(a.P,l,Ue),N(l),a(a.P+a.F*De,l,{set:We}),a(a.P+a.F*!O,l,Ve),r||C.toString==fe||(C.toString=fe),a(a.P+a.F*i((function(){new h(1).slice()})),l,{slice:Fe}),a(a.P+a.F*(i((function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()}))||!i((function(){C.toLocaleString.call([1,2])}))),l,{toLocaleString:Be}),L[l]=O?P:I,r||O||_(C,ve,I)}}else e.exports=function(){}},791125:(e,t,n)=>{"use strict";var r=n(803816),o=n(867057),i=n(4461),a=n(889383),s=n(87728),c=n(424408),l=n(574253),u=n(83328),d=n(781467),_=n(410875),p=n(494843),h=n(320616).f,f=n(99275).f,m=n(846852),v=n(222943),g="ArrayBuffer",y="DataView",E="Wrong index!",w=r.ArrayBuffer,b=r.DataView,C=r.Math,S=r.RangeError,T=r.Infinity,A=w,D=C.abs,P=C.pow,O=C.floor,I=C.log,k=C.LN2,R="buffer",M="byteLength",L="byteOffset",x=o?"_b":R,N=o?"_l":M,B=o?"_o":L;function U(e,t,n){var r,o,i,a=new Array(n),s=8*n-t-1,c=(1<<s)-1,l=c>>1,u=23===t?P(2,-24)-P(2,-77):0,d=0,_=e<0||0===e&&1/e<0?1:0;for((e=D(e))!=e||e===T?(o=e!=e?1:0,r=c):(r=O(I(e)/k),e*(i=P(2,-r))<1&&(r--,i*=2),(e+=r+l>=1?u/i:u*P(2,1-l))*i>=2&&(r++,i/=2),r+l>=c?(o=0,r=c):r+l>=1?(o=(e*i-1)*P(2,t),r+=l):(o=e*P(2,l-1)*P(2,t),r=0));t>=8;a[d++]=255&o,o/=256,t-=8);for(r=r<<t|o,s+=t;s>0;a[d++]=255&r,r/=256,s-=8);return a[--d]|=128*_,a}function F(e,t,n){var r,o=8*n-t-1,i=(1<<o)-1,a=i>>1,s=o-7,c=n-1,l=e[c--],u=127&l;for(l>>=7;s>0;u=256*u+e[c],c--,s-=8);for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;r=256*r+e[c],c--,s-=8);if(0===u)u=1-a;else{if(u===i)return r?NaN:l?-T:T;r+=P(2,t),u-=a}return(l?-1:1)*r*P(2,u-t)}function W(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function V(e){return[255&e]}function H(e){return[255&e,e>>8&255]}function j(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function K(e){return U(e,52,8)}function z(e){return U(e,23,4)}function G(e,t,n){f(e.prototype,t,{get:function(){return this[n]}})}function q(e,t,n,r){var o=p(+n);if(o+t>e[N])throw S(E);var i=e[x]._b,a=o+e[B],s=i.slice(a,a+t);return r?s:s.reverse()}function Y(e,t,n,r,o,i){var a=p(+n);if(a+t>e[N])throw S(E);for(var s=e[x]._b,c=a+e[B],l=r(+o),u=0;u<t;u++)s[c+u]=l[i?u:t-u-1]}if(a.ABV){if(!l((function(){w(1)}))||!l((function(){new w(-1)}))||l((function(){return new w,new w(1.5),new w(NaN),w.name!=g}))){for(var $,X=(w=function(e){return u(this,w),new A(p(e))}).prototype=A.prototype,Q=h(A),J=0;Q.length>J;)($=Q[J++])in w||s(w,$,A[$]);i||(X.constructor=w)}var Z=new b(new w(2)),ee=b.prototype.setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||c(b.prototype,{setInt8:function(e,t){ee.call(this,e,t<<24>>24)},setUint8:function(e,t){ee.call(this,e,t<<24>>24)}},!0)}else w=function(e){u(this,w,g);var t=p(e);this._b=m.call(new Array(t),0),this[N]=t},b=function(e,t,n){u(this,b,y),u(e,w,y);var r=e[N],o=d(t);if(o<0||o>r)throw S("Wrong offset!");if(o+(n=void 0===n?r-o:_(n))>r)throw S("Wrong length!");this[x]=e,this[B]=o,this[N]=n},o&&(G(w,M,"_l"),G(b,R,"_b"),G(b,M,"_l"),G(b,L,"_o")),c(b.prototype,{getInt8:function(e){return q(this,1,e)[0]<<24>>24},getUint8:function(e){return q(this,1,e)[0]},getInt16:function(e){var t=q(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=q(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return W(q(this,4,e,arguments[1]))},getUint32:function(e){return W(q(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return F(q(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return F(q(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){Y(this,1,e,V,t)},setUint8:function(e,t){Y(this,1,e,V,t)},setInt16:function(e,t){Y(this,2,e,H,t,arguments[2])},setUint16:function(e,t){Y(this,2,e,H,t,arguments[2])},setInt32:function(e,t){Y(this,4,e,j,t,arguments[2])},setUint32:function(e,t){Y(this,4,e,j,t,arguments[2])},setFloat32:function(e,t){Y(this,4,e,z,t,arguments[2])},setFloat64:function(e,t){Y(this,8,e,K,t,arguments[2])}});v(w,g),v(b,y),s(b.prototype,a.VIEW,!0),t.ArrayBuffer=w,t.DataView=b},889383:(e,t,n)=>{for(var r,o=n(803816),i=n(87728),a=n(693953),s=a("typed_array"),c=a("view"),l=!(!o.ArrayBuffer||!o.DataView),u=l,d=0,_="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(r=o[_[d++]])?(i(r.prototype,s,!0),i(r.prototype,c,!0)):u=!1;e.exports={ABV:l,CONSTR:u,TYPED:s,VIEW:c}},693953:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},630575:(e,t,n)=>{var r=n(803816).navigator;e.exports=r&&r.userAgent||""},236074:(e,t,n)=>{var r=n(803816),o=n(825645),i=n(4461),a=n(228787),s=n(99275).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},228787:(e,t,n)=>{t.f=n(286314)},286314:(e,t,n)=>{var r=n(103825)("wks"),o=n(693953),i=n(803816).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},969002:(e,t,n)=>{var r=n(341488),o=n(286314)("iterator"),i=n(487234);e.exports=n(825645).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},530522:(e,t,n)=>{"use strict";var r=n(500741),o=n(542985),i=n(820508),a=n(928851),s=n(386555),c=n(410875),l=n(592811),u=n(969002);o(o.S+o.F*!n(307462)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,o,d,_=i(e),p="function"==typeof this?this:Array,h=arguments.length,f=h>1?arguments[1]:void 0,m=void 0!==f,v=0,g=u(_);if(m&&(f=r(f,h>2?arguments[2]:void 0,2)),null==g||p==Array&&s(g))for(n=new p(t=c(_.length));t>v;v++)l(n,v,m?f(_[v],v):_[v]);else for(d=g.call(_),n=new p;!(o=d.next()).done;v++)l(n,v,m?a(d,f,[o.value,v],!0):o.value);return n.length=v,n}})},856997:(e,t,n)=>{"use strict";var r=n(617722),o=n(715436),i=n(487234),a=n(922110);e.exports=n(142923)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},820075:(e,t,n)=>{"use strict";var r=n(542985),o=n(124963),i=n(820508),a=n(574253),s=[].sort,c=[1,2,3];r(r.P+r.F*(a((function(){c.sort(void 0)}))||!a((function(){c.sort(null)}))||!n(577717)(s)),"Array",{sort:function(e){return void 0===e?s.call(i(this)):s.call(i(this),o(e))}})},175115:(e,t,n)=>{var r=n(542985);r(r.S+r.F,"Object",{assign:n(35345)})},296253:(e,t,n)=>{"use strict";var r=n(341488),o={};o[n(286314)("toStringTag")]="z",o+""!="[object z]"&&n(277234)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},940851:(e,t,n)=>{"use strict";var r,o,i,a,s=n(4461),c=n(803816),l=n(500741),u=n(341488),d=n(542985),_=n(755286),p=n(124963),h=n(83328),f=n(803531),m=n(158364),v=n(574193).set,g=n(714351)(),y=n(543499),E=n(110188),w=n(630575),b=n(750094),C="Promise",S=c.TypeError,T=c.process,A=T&&T.versions,D=A&&A.v8||"",P=c.Promise,O="process"==u(T),I=function(){},k=o=y.f,R=!!function(){try{var e=P.resolve(1),t=(e.constructor={})[n(286314)("species")]=function(e){e(I,I)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(I)instanceof t&&0!==D.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),M=function(e){var t;return!(!_(e)||"function"!=typeof(t=e.then))&&t},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;g((function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a,s=o?t.ok:t.fail,c=t.resolve,l=t.reject,u=t.domain;try{s?(o||(2==e._h&&B(e),e._h=1),!0===s?n=r:(u&&u.enter(),n=s(r),u&&(u.exit(),a=!0)),n===t.promise?l(S("Promise-chain cycle")):(i=M(n))?i.call(n,c,l):c(n)):l(r)}catch(e){u&&!a&&u.exit(),l(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&x(e)}))}},x=function(e){v.call(c,(function(){var t,n,r,o=e._v,i=N(e);if(i&&(t=E((function(){O?T.emit("unhandledRejection",o,e):(n=c.onunhandledrejection)?n({promise:e,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)})),e._h=O||N(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},B=function(e){v.call(c,(function(){var t;O?T.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})}))},U=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},F=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=M(e))?g((function(){var r={_w:n,_d:!1};try{t.call(e,l(F,r,1),l(U,r,1))}catch(e){U.call(r,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){U.call({_w:n,_d:!1},e)}}};R||(P=function(e){h(this,P,C,"_h"),p(e),r.call(this);try{e(l(F,this,1),l(U,this,1))}catch(e){U.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(424408)(P.prototype,{then:function(e,t){var n=k(m(this,P));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=O?T.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(F,e,1),this.reject=l(U,e,1)},y.f=k=function(e){return e===P||e===a?new i(e):o(e)}),d(d.G+d.W+d.F*!R,{Promise:P}),n(222943)(P,C),n(102974)(C),a=n(825645).Promise,d(d.S+d.F*!R,C,{reject:function(e){var t=k(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!R),C,{resolve:function(e){return b(s&&this===a?P:this,e)}}),d(d.S+d.F*!(R&&n(307462)((function(e){P.all(e).catch(I)}))),C,{all:function(e){var t=this,n=k(t),r=n.resolve,o=n.reject,i=E((function(){var n=[],i=0,a=1;f(e,!1,(function(e){var s=i++,c=!1;n.push(void 0),a++,t.resolve(e).then((function(e){c||(c=!0,n[s]=e,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=k(t),r=n.reject,o=E((function(){f(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},283946:(e,t,n)=>{var r=n(803816),o=n(640266),i=n(99275).f,a=n(320616).f,s=n(355364),c=n(753218),l=r.RegExp,u=l,d=l.prototype,_=/a/g,p=/a/g,h=new l(_)!==_;if(n(867057)&&(!h||n(574253)((function(){return p[n(286314)("match")]=!1,l(_)!=_||l(p)==p||"/a/i"!=l(_,"i")})))){l=function(e,t){var n=this instanceof l,r=s(e),i=void 0===t;return!n&&r&&e.constructor===l&&i?e:o(h?new u(r&&!i?e.source:e,t):u((r=e instanceof l)?e.source:e,r&&i?c.call(e):t),n?this:d,l)};for(var f=function(e){e in l||i(l,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})},m=a(u),v=0;m.length>v;)f(m[v++]);d.constructor=l,l.prototype=d,n(277234)(r,"RegExp",l)}n(102974)("RegExp")},118269:(e,t,n)=>{"use strict";var r=n(121165);n(542985)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},176774:(e,t,n)=>{n(867057)&&"g"!=/./g.flags&&n(99275).f(RegExp.prototype,"flags",{configurable:!0,get:n(753218)})},21466:(e,t,n)=>{"use strict";var r=n(627007),o=n(410875),i=n(376793),a=n(827787);n(528082)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var c=r(e),l=String(this);if(!c.global)return a(c,l);var u=c.unicode;c.lastIndex=0;for(var d,_=[],p=0;null!==(d=a(c,l));){var h=String(d[0]);_[p]=h,""===h&&(c.lastIndex=i(l,o(c.lastIndex),u)),p++}return 0===p?null:_}]}))},59357:(e,t,n)=>{"use strict";var r=n(627007),o=n(820508),i=n(410875),a=n(781467),s=n(376793),c=n(827787),l=Math.max,u=Math.min,d=Math.floor,_=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(528082)("replace",2,(function(e,t,n,h){return[function(r,o){var i=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(e,t){var o=h(n,e,this,t);if(o.done)return o.value;var d=r(e),_=String(this),p="function"==typeof t;p||(t=String(t));var m=d.global;if(m){var v=d.unicode;d.lastIndex=0}for(var g=[];;){var y=c(d,_);if(null===y)break;if(g.push(y),!m)break;""===String(y[0])&&(d.lastIndex=s(_,i(d.lastIndex),v))}for(var E,w="",b=0,C=0;C<g.length;C++){y=g[C];for(var S=String(y[0]),T=l(u(a(y.index),_.length),0),A=[],D=1;D<y.length;D++)A.push(void 0===(E=y[D])?E:String(E));var P=y.groups;if(p){var O=[S].concat(A,T,_);void 0!==P&&O.push(P);var I=String(t.apply(void 0,O))}else I=f(S,_,T,A,P,t);T>=b&&(w+=_.slice(b,T)+I,b=T+S.length)}return w+_.slice(b)}];function f(e,t,r,i,a,s){var c=r+e.length,l=i.length,u=p;return void 0!==a&&(a=o(a),u=_),n.call(s,u,(function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(c);case"<":s=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return n;if(u>l){var _=d(u/10);return 0===_?n:_<=l?void 0===i[_-1]?o.charAt(1):i[_-1]+o.charAt(1):n}s=i[u-1]}return void 0===s?"":s}))}}))},976142:(e,t,n)=>{"use strict";var r=n(627007),o=n(227195),i=n(827787);n(528082)("search",1,(function(e,t,n,a){return[function(n){var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=r(e),c=String(this),l=s.lastIndex;o(l,0)||(s.lastIndex=0);var u=i(s,c);return o(s.lastIndex,l)||(s.lastIndex=l),null===u?-1:u.index}]}))},751876:(e,t,n)=>{"use strict";var r=n(355364),o=n(627007),i=n(158364),a=n(376793),s=n(410875),c=n(827787),l=n(121165),u=n(574253),d=Math.min,_=[].push,p=4294967295,h=!u((function(){RegExp(p,"y")}));n(528082)("split",2,(function(e,t,n,u){var f;return f="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,t){var o=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(o,e,t);for(var i,a,s,c=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,h=void 0===t?p:t>>>0,f=new RegExp(e.source,u+"g");(i=l.call(f,o))&&!((a=f.lastIndex)>d&&(c.push(o.slice(d,i.index)),i.length>1&&i.index<o.length&&_.apply(c,i.slice(1)),s=i[0].length,d=a,c.length>=h));)f.lastIndex===i.index&&f.lastIndex++;return d===o.length?!s&&f.test("")||c.push(""):c.push(o.slice(d)),c.length>h?c.slice(0,h):c}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var o=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):f.call(String(o),n,r)},function(e,t){var r=u(f,e,this,t,f!==n);if(r.done)return r.value;var l=o(e),_=String(this),m=i(l,RegExp),v=l.unicode,g=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(h?"y":"g"),y=new m(h?l:"^(?:"+l.source+")",g),E=void 0===t?p:t>>>0;if(0===E)return[];if(0===_.length)return null===c(y,_)?[_]:[];for(var w=0,b=0,C=[];b<_.length;){y.lastIndex=h?b:0;var S,T=c(y,h?_:_.slice(b));if(null===T||(S=d(s(y.lastIndex+(h?0:b)),_.length))===w)b=a(_,b,v);else{if(C.push(_.slice(w,b)),C.length===E)return C;for(var A=1;A<=T.length-1;A++)if(C.push(T[A]),C.length===E)return C;b=w=S}}return C.push(_.slice(w)),C}]}))},66108:(e,t,n)=>{"use strict";n(176774);var r=n(627007),o=n(753218),i=n(867057),a="toString",s=/./.toString,c=function(e){n(277234)(RegExp.prototype,a,e,!0)};n(574253)((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?c((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?o.call(e):void 0)})):s.name!=a&&c((function(){return s.call(this)}))},95767:(e,t,n)=>{"use strict";var r=n(803816),o=n(479181),i=n(867057),a=n(542985),s=n(277234),c=n(484728).KEY,l=n(574253),u=n(103825),d=n(222943),_=n(693953),p=n(286314),h=n(228787),f=n(236074),m=n(505541),v=n(904302),g=n(627007),y=n(755286),E=n(820508),w=n(922110),b=n(121689),C=n(990681),S=n(342503),T=n(639327),A=n(518693),D=n(764548),P=n(99275),O=n(647184),I=A.f,k=P.f,R=T.f,M=r.Symbol,L=r.JSON,x=L&&L.stringify,N=p("_hidden"),B=p("toPrimitive"),U={}.propertyIsEnumerable,F=u("symbol-registry"),W=u("symbols"),V=u("op-symbols"),H=Object.prototype,j="function"==typeof M&&!!D.f,K=r.QObject,z=!K||!K.prototype||!K.prototype.findChild,G=i&&l((function(){return 7!=S(k({},"a",{get:function(){return k(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=I(H,t);r&&delete H[t],k(e,t,n),r&&e!==H&&k(H,t,r)}:k,q=function(e){var t=W[e]=S(M.prototype);return t._k=e,t},Y=j&&"symbol"==typeof M.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof M},$=function(e,t,n){return e===H&&$(V,t,n),g(e),t=b(t,!0),g(n),o(W,t)?(n.enumerable?(o(e,N)&&e[N][t]&&(e[N][t]=!1),n=S(n,{enumerable:C(0,!1)})):(o(e,N)||k(e,N,C(1,{})),e[N][t]=!0),G(e,t,n)):k(e,t,n)},X=function(e,t){g(e);for(var n,r=m(t=w(t)),o=0,i=r.length;i>o;)$(e,n=r[o++],t[n]);return e},Q=function(e){var t=U.call(this,e=b(e,!0));return!(this===H&&o(W,e)&&!o(V,e))&&(!(t||!o(this,e)||!o(W,e)||o(this,N)&&this[N][e])||t)},J=function(e,t){if(e=w(e),t=b(t,!0),e!==H||!o(W,t)||o(V,t)){var n=I(e,t);return!n||!o(W,t)||o(e,N)&&e[N][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=R(w(e)),r=[],i=0;n.length>i;)o(W,t=n[i++])||t==N||t==c||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=R(n?V:w(e)),i=[],a=0;r.length>a;)!o(W,t=r[a++])||n&&!o(H,t)||i.push(W[t]);return i};j||(s((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var e=_(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(V,n),o(this,N)&&o(this[N],e)&&(this[N][e]=!1),G(this,e,C(1,n))};return i&&z&&G(H,e,{configurable:!0,set:t}),q(e)}).prototype,"toString",(function(){return this._k})),A.f=J,P.f=$,n(320616).f=T.f=Z,n(14682).f=Q,D.f=ee,i&&!n(4461)&&s(H,"propertyIsEnumerable",Q,!0),h.f=function(e){return q(p(e))}),a(a.G+a.W+a.F*!j,{Symbol:M});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var re=O(p.store),oe=0;re.length>oe;)f(re[oe++]);a(a.S+a.F*!j,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=M(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){z=!0},useSimple:function(){z=!1}}),a(a.S+a.F*!j,"Object",{create:function(e,t){return void 0===t?S(e):X(S(e),t)},defineProperty:$,defineProperties:X,getOwnPropertyDescriptor:J,getOwnPropertyNames:Z,getOwnPropertySymbols:ee});var ie=l((function(){D.f(1)}));a(a.S+a.F*ie,"Object",{getOwnPropertySymbols:function(e){return D.f(E(e))}}),L&&a(a.S+a.F*(!j||l((function(){var e=M();return"[null]"!=x([e])||"{}"!=x({a:e})||"{}"!=x(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(y(t)||void 0!==e)&&!Y(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,x.apply(L,r)}}),M.prototype[B]||n(87728)(M.prototype,B,M.prototype.valueOf),d(M,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},183318:(e,t,n)=>{n(778440)("Uint32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},446964:(e,t,n)=>{n(778440)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},83276:(e,t,n)=>{var r=n(542985),o=n(551131)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},796409:(e,t,n)=>{var r=n(542985),o=n(551131)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},209865:(e,t,n)=>{"use strict";var r=n(542985),o=n(825645),i=n(803816),a=n(158364),s=n(750094);r(r.P+r.R,"Promise",{finally:function(e){var t=a(this,o.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},731898:(e,t,n)=>{"use strict";var r=n(542985),o=n(543499),i=n(110188);r(r.S,"Promise",{try:function(e){var t=o.f(this),n=i(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},579665:(e,t,n)=>{n(236074)("asyncIterator")},991181:(e,t,n)=>{for(var r=n(856997),o=n(647184),i=n(277234),a=n(803816),s=n(87728),c=n(487234),l=n(286314),u=l("iterator"),d=l("toStringTag"),_=c.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(p),f=0;f<h.length;f++){var m,v=h[f],g=p[v],y=a[v],E=y&&y.prototype;if(E&&(E[u]||s(E,u,_),E[d]||s(E,d,v),c[v]=_,g))for(m in r)E[m]||i(E,m,r[m],!0)}},408091:e=>{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var n=Object(e),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var i=Object.keys(Object(o)),a=0,s=i.length;a<s;a++){var c=i[a],l=Object.getOwnPropertyDescriptor(o,c);void 0!==l&&l.enumerable&&(n[c]=o[c])}}return n}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},220773:(e,t,n)=>{var r="__lodash_hash_undefined__",o="[object Function]",i="[object GeneratorFunction]",a=/^\[object .+?Constructor\]$/,s="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,l=s||c||Function("return this")();var u,d=Array.prototype,_=Function.prototype,p=Object.prototype,h=l["__core-js_shared__"],f=(u=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",m=_.toString,v=p.hasOwnProperty,g=p.toString,y=RegExp("^"+m.call(v).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=d.splice,w=O(l,"Map"),b=O(Object,"create");function C(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function A(e,t){for(var n,r,o=e.length;o--;)if((n=e[o][0])===(r=t)||n!=n&&r!=r)return o;return-1}function D(e){if(!k(e)||(t=e,f&&f in t))return!1;var t,n=function(e){var t=k(e)?g.call(e):"";return t==o||t==i}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?y:a;return n.test(function(e){if(null!=e){try{return m.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function P(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function O(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return D(n)?n:void 0}function I(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(I.Cache||T),n}function k(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}C.prototype.clear=function(){this.__data__=b?b(null):{}},C.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},C.prototype.get=function(e){var t=this.__data__;if(b){var n=t[e];return n===r?void 0:n}return v.call(t,e)?t[e]:void 0},C.prototype.has=function(e){var t=this.__data__;return b?void 0!==t[e]:v.call(t,e)},C.prototype.set=function(e,t){return this.__data__[e]=b&&void 0===t?r:t,this},S.prototype.clear=function(){this.__data__=[]},S.prototype.delete=function(e){var t=this.__data__,n=A(t,e);return!(n<0)&&(n==t.length-1?t.pop():E.call(t,n,1),!0)},S.prototype.get=function(e){var t=this.__data__,n=A(t,e);return n<0?void 0:t[n][1]},S.prototype.has=function(e){return A(this.__data__,e)>-1},S.prototype.set=function(e,t){var n=this.__data__,r=A(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},T.prototype.clear=function(){this.__data__={hash:new C,map:new(w||S),string:new C}},T.prototype.delete=function(e){return P(this,e).delete(e)},T.prototype.get=function(e){return P(this,e).get(e)},T.prototype.has=function(e){return P(this,e).has(e)},T.prototype.set=function(e,t){return P(this,e).set(e,t),this},I.Cache=T,e.exports=I},535557:(e,t,n)=>{"use strict";function r(e,t){throw new TypeError(`unexpected tag 0x${e.toString(16)} (${t} expected)`)}function o(e){return 127&e}function i(e){return 0==(128&e)}function a(e){return 224==(224&e)}function s(e){return 160==(224&e)}function c(e){return 144==(240&e)}function l(e){return 128==(240&e)}function u(e,t,n){const r=t.byteLength;if(r<=255)e.putUi8(n),e.putUi8(r);else if(r<=65535)e.putUi8(n+1),e.putUi16(r);else{if(!(r<=4294967295))throw new RangeError("length limit exceeded");e.putUi8(n+2),e.putUi32(r)}e.put(t)}function d(e){const t=e.getUi8();let n;switch(t){case 192:n=0;break;case 196:case 217:n=e.getUi8();break;case 197:case 218:n=e.getUi16();break;case 198:case 219:n=e.getUi32();break;default:s(t)||r(t,"bytes or string"),n=function(e){return 31&e}(t)}return e.get(n)}function _(e,t){t<16?e.putUi8(144|15&t):m(e,220,t)}function p(e,t){const n=e.getUi8(),r=c(n)?function(e){return 15&e}(n):v(e,n,220,"array");if(null!=t&&r!==t)throw new Error(`invalid array header size ${r}`);return r}function h(e,t){t<16?e.putUi8(128|15&t):m(e,222,t)}function f(e,t){const n=e.getUi8(),r=l(n)?function(e){return 15&e}(n):v(e,n,222,"map");if(null!=t&&r!==t)throw new Error(`invalid map header size ${r}`);return r}function m(e,t,n){if(n<=65535)e.putUi8(t),e.putUi16(n);else{if(!(n<=4294967295))throw new RangeError("length limit exceeded");e.putUi8(t+1),e.putUi32(n)}}function v(e,t,n,o){switch(t){case 192:return 0;case n:return e.getUi16();case n+1:return e.getUi32();default:r(t,o)}}n.d(t,{decode:()=>I});const g={enc(e,t){(function(e){switch(typeof e){case"undefined":return y;case"boolean":return E;case"number":return isFinite(e)&&Math.floor(e)===e?e<0?w:b:C;case"string":return T;case"object":return null===e?y:Array.isArray(e)?D:e instanceof Uint8Array||e instanceof ArrayBuffer?S:e instanceof Date?A:O;default:throw new TypeError("unsupported type "+typeof e)}})(t).enc(e,t)},dec:e=>function(e){switch(e){case 192:return y;case 194:case 195:return E;case 208:case 209:case 210:case 211:return w;case 204:case 205:case 206:case 207:return b;case 202:case 203:return C;case 196:case 197:case 198:return S;case 217:case 218:case 219:return T;case 220:case 221:return D;case 222:case 223:return O;case 214:case 215:case 199:return A;default:if(i(e)||a(e))return w;if(s(e))return T;if(c(e))return D;if(l(e))return O;throw new TypeError(`unsupported tag ${e}`)}}(e.peek()).dec(e)},y={enc(e,t){e.putUi8(192)},dec(e){const t=e.getUi8();return 192!==t&&r(t,"nil"),null}},E={enc(e,t){e.putUi8(t?195:194)},dec(e){const t=e.getUi8();switch(t){case 192:case 194:return!1;case 195:return!0;default:r(t,"bool")}}},w={enc(e,t){-128<=t&&t<=127?t>=0?e.putUi8(o(t)):t>-32?e.putUi8(224|31&t):(e.putUi8(208),e.putUi8(t)):-32768<=t&&t<=32767?(e.putI8(209),e.putI16(t)):-2147483648<=t&&t<=2147483647?(e.putI8(210),e.putI32(t)):(e.putI8(211),e.putI64(t))},dec(e){const t=e.getUi8();if(i(t))return function(e){return 127&e}(t);if(a(t))return function(e){return e-256}(t);switch(t){case 192:return 0;case 208:return e.getI8();case 209:return e.getI16();case 210:return e.getI32();case 211:return e.getI64();case 204:return e.getUi8();case 205:return e.getUi16();case 206:return e.getUi32();case 207:return e.getUi64();default:r(t,"int")}}},b={enc(e,t){if(t<0)throw new Error(`not an uint: ${t}`);t<=127?e.putUi8(o(t)):t<=255?(e.putUi8(204),e.putUi8(t)):t<=65535?(e.putUi8(205),e.putUi16(t)):t<=4294967295?(e.putUi8(206),e.putUi32(t)):(e.putUi8(207),e.putUi64(t))},dec(e){const t=w.dec(e);if(t<0)throw new RangeError("uint underflow");return t}},C={enc(e,t){e.putUi8(203),e.putF(t)},dec(e){const t=e.getUi8();switch(t){case 192:return 0;case 202:return e.getF32();case 203:return e.getF64();default:r(t,"float")}}},S={enc(e,t){u(e,t,196)},dec:d},T={enc(e,t){const n=function(e){const t=e.length,n=new Uint8Array(4*t);let r,o=0,i=0;for(;i<t;)r=e.charCodeAt(i++),55296==(64512&r)&&(r=(r<<10)+e.charCodeAt(i++)-56613888),r<128?n[o++]=r:r<2048?(n[o++]=192+(r>>6),n[o++]=128+(63&r)):r<65536?(n[o++]=224+(r>>12),n[o++]=128+(r>>6&63),n[o++]=128+(63&r)):(n[o++]=240+(r>>18),n[o++]=128+(r>>12&63),n[o++]=128+(r>>6&63),n[o++]=128+(63&r));return n.buffer.slice(0,o)}(t);n.byteLength<32?(e.putUi8(160|31&n.byteLength),e.put(n)):u(e,n,217)},dec:e=>function(e){return new TextDecoder("utf-8").decode(e)}(d(e))},A={enc(e,t){const n=t.getTime();e.putUi8(199),e.putUi8(12),e.putI8(-1),e.putUi32(n%1e3*1e6),e.putI64(n/1e3)},dec(e){const t=e.getUi8();switch(t){case 214:if(-1===e.getI8())return new Date(1e3*e.getUi32());break;case 215:if(-1===e.getI8()){const t=e.getUi32(),n=e.getUi32();return new Date(1e3*(n+4294967296*(3&t))+t/4e6)}break;case 199:if(12===e.getUi8()&&-1===e.getI8()){const t=e.getUi32(),n=e.getI64();return new Date(1e3*n+t/1e6)}}r(t,"time")}},D=(P=g,{encHeader:_,decHeader:p,enc(e,t){_(e,t.length),t.forEach((t=>P.enc(e,t)))},dec(e){const t=[];for(let n=p(e);n>0;--n)t.push(P.dec(e));return t}});var P;const O=function(e,t){return{encHeader:h,decHeader:f,enc(n,r){const o=Object.keys(r);h(n,o.length),o.forEach((o=>{e.enc(n,o),t.enc(n,r[o])}))},dec(n){const r={};for(let o=f(n);o>0;--o){r[e.dec(n)]=t.dec(n)}return r}}}(g,g);function I(e,t){return(t||g).dec(function(e){let t=ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e),n=0;return{peek:()=>t.getUint8(n),get(e){n+=e;const r=t.byteOffset;return t.buffer.slice(r+n-e,r+n)},getI8:()=>t.getInt8(n++),getI16:()=>(n+=2,t.getInt16(n-2)),getI32:()=>(n+=4,t.getInt32(n-4)),getI64:()=>(n+=8,4294967296*t.getInt32(n-8)+t.getUint32(n-4)),getUi8:()=>t.getUint8(n++),getUi16:()=>(n+=2,t.getUint16(n-2)),getUi32:()=>(n+=4,t.getUint32(n-4)),getUi64:()=>(n+=8,4294967296*t.getUint32(n-8)+t.getUint32(n-4)),getF32:()=>(n+=4,t.getFloat32(n-4)),getF64:()=>(n+=8,t.getFloat64(n-8))}}(e))}},892703:(e,t,n)=>{"use strict";var r=n(150414);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},45697:(e,t,n)=>{e.exports=n(892703)()},150414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},364448:(e,t,n)=>{"use strict";var r=n(667294),o=n(925013),i=n(363840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var s=new Set,c={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(c[e]=t,e=0;e<t.length;e++)s.add(t[e])}var d=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),_=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p=Object.prototype.hasOwnProperty,h={},f={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function E(e,t,n,r){var o=v.hasOwnProperty(t)?v[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!p.call(f,e)||!p.call(h,e)&&(_.test(e)?f[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,b=60103,C=60106,S=60107,T=60108,A=60114,D=60109,P=60110,O=60112,I=60113,k=60120,R=60115,M=60116,L=60121,x=60128,N=60129,B=60130,U=60131;if("function"==typeof Symbol&&Symbol.for){var F=Symbol.for;b=F("react.element"),C=F("react.portal"),S=F("react.fragment"),T=F("react.strict_mode"),A=F("react.profiler"),D=F("react.provider"),P=F("react.context"),O=F("react.forward_ref"),I=F("react.suspense"),k=F("react.suspense_list"),R=F("react.memo"),M=F("react.lazy"),L=F("react.block"),F("react.scope"),x=F("react.opaque.id"),N=F("react.debug_trace_mode"),B=F("react.offscreen"),U=F("react.legacy_hidden")}var W,V="function"==typeof Symbol&&Symbol.iterator;function H(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=V&&e[V]||e["@@iterator"])?e:null}function j(e){if(void 0===W)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||""}return"\n"+W+e}var K=!1;function z(e,t){if(!e||K)return"";K=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{K=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?j(e):""}function G(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=z(e.type,!1);case 11:return e=z(e.type.render,!1);case 22:return e=z(e.type._render,!1);case 1:return e=z(e.type,!0);default:return""}}function q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case S:return"Fragment";case C:return"Portal";case A:return"Profiler";case T:return"StrictMode";case I:return"Suspense";case k:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case D:return(e._context.displayName||"Context")+".Provider";case O:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case R:return q(e.type);case L:return q(e._render);case M:t=e._payload,e=e._init;try{return q(e(t))}catch(e){}}return null}function Y(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function X(e){e._valueTracker||(e._valueTracker=function(e){var t=$(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function J(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Z(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Y(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&E(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=Y(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,Y(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&J(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Y(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function se(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ce(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:Y(n)}}function le(e,t){var n=Y(t.value),r=Y(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ue(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var de="http://www.w3.org/1999/xhtml",_e="http://www.w3.org/2000/svg";function pe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?pe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var fe,me,ve=(me=function(e,t){if(e.namespaceURI!==_e||"innerHTML"in e)e.innerHTML=t;else{for((fe=fe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return me(e,t)}))}:me);function ge(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ee=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}function be(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ye).forEach((function(e){Ee.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ye[t]=ye[e]}))}));var Ce=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(Ce[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function Te(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ae(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var De=null,Pe=null,Oe=null;function Ie(e){if(e=ro(e)){if("function"!=typeof De)throw Error(a(280));var t=e.stateNode;t&&(t=io(t),De(e.stateNode,e.type,t))}}function ke(e){Pe?Oe?Oe.push(e):Oe=[e]:Pe=e}function Re(){if(Pe){var e=Pe,t=Oe;if(Oe=Pe=null,Ie(e),t)for(e=0;e<t.length;e++)Ie(t[e])}}function Me(e,t){return e(t)}function Le(e,t,n,r,o){return e(t,n,r,o)}function xe(){}var Ne=Me,Be=!1,Ue=!1;function Fe(){null===Pe&&null===Oe||(xe(),Re())}function We(e,t){var n=e.stateNode;if(null===n)return null;var r=io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Ve=!1;if(d)try{var He={};Object.defineProperty(He,"passive",{get:function(){Ve=!0}}),window.addEventListener("test",He,He),window.removeEventListener("test",He,He)}catch(me){Ve=!1}function je(e,t,n,r,o,i,a,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Ke=!1,ze=null,Ge=!1,qe=null,Ye={onError:function(e){Ke=!0,ze=e}};function $e(e,t,n,r,o,i,a,s,c){Ke=!1,ze=null,je.apply(Ye,arguments)}function Xe(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Je(e){if(Xe(e)!==e)throw Error(a(188))}function Ze(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Xe(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Je(o),e;if(i===r)return Je(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s){for(c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function et(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var tt,nt,rt,ot,it=!1,at=[],st=null,ct=null,lt=null,ut=new Map,dt=new Map,_t=[],pt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function ft(e,t){switch(e){case"focusin":case"focusout":st=null;break;case"dragenter":case"dragleave":ct=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":ut.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dt.delete(t.pointerId)}}function mt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&(null!==(t=ro(t))&&nt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function vt(e){var t=no(e.target);if(null!==t){var n=Xe(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void ot(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){rt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function gt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=ro(n))&&nt(t),e.blockedOn=n,!1;t.shift()}return!0}function yt(e,t,n){gt(e)&&n.delete(t)}function Et(){for(it=!1;0<at.length;){var e=at[0];if(null!==e.blockedOn){null!==(e=ro(e.blockedOn))&&tt(e);break}for(var t=e.targetContainers;0<t.length;){var n=Zt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&at.shift()}null!==st&&gt(st)&&(st=null),null!==ct&&gt(ct)&&(ct=null),null!==lt&&gt(lt)&&(lt=null),ut.forEach(yt),dt.forEach(yt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,it||(it=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Et)))}function bt(e){function t(t){return wt(t,e)}if(0<at.length){wt(at[0],e);for(var n=1;n<at.length;n++){var r=at[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==st&&wt(st,e),null!==ct&&wt(ct,e),null!==lt&&wt(lt,e),ut.forEach(t),dt.forEach(t),n=0;n<_t.length;n++)(r=_t[n]).blockedOn===e&&(r.blockedOn=null);for(;0<_t.length&&null===(n=_t[0]).blockedOn;)vt(n),null===n.blockedOn&&_t.shift()}function Ct(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:Ct("Animation","AnimationEnd"),animationiteration:Ct("Animation","AnimationIteration"),animationstart:Ct("Animation","AnimationStart"),transitionend:Ct("Transition","TransitionEnd")},Tt={},At={};function Dt(e){if(Tt[e])return Tt[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in At)return Tt[e]=n[t];return e}d&&(At=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Pt=Dt("animationend"),Ot=Dt("animationiteration"),It=Dt("animationstart"),kt=Dt("transitionend"),Rt=new Map,Mt=new Map,Lt=["abort","abort",Pt,"animationEnd",Ot,"animationIteration",It,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",kt,"transitionEnd","waiting","waiting"];function xt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Mt.set(r,t),Rt.set(r,o),l(o,[r])}}(0,i.unstable_now)();var Nt=8;function Bt(e){if(0!=(1&e))return Nt=15,1;if(0!=(2&e))return Nt=14,2;if(0!=(4&e))return Nt=13,4;var t=24&e;return 0!==t?(Nt=12,t):0!=(32&e)?(Nt=11,32):0!==(t=192&e)?(Nt=10,t):0!=(256&e)?(Nt=9,256):0!==(t=3584&e)?(Nt=8,t):0!=(4096&e)?(Nt=7,4096):0!==(t=4186112&e)?(Nt=6,t):0!==(t=62914560&e)?(Nt=5,t):67108864&e?(Nt=4,67108864):0!=(134217728&e)?(Nt=3,134217728):0!==(t=805306368&e)?(Nt=2,t):0!=(1073741824&e)?(Nt=1,1073741824):(Nt=8,e)}function Ut(e,t){var n=e.pendingLanes;if(0===n)return Nt=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,s=e.pingedLanes;if(0!==i)r=i,o=Nt=15;else if(0!==(i=134217727&n)){var c=i&~a;0!==c?(r=Bt(c),o=Nt):0!==(s&=i)&&(r=Bt(s),o=Nt)}else 0!==(i=n&~a)?(r=Bt(i),o=Nt):0!==s&&(r=Bt(s),o=Nt);if(0===r)return 0;if(r=n&((0>(r=31-Kt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&a)){if(Bt(t),o<=Nt)return t;Nt=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Kt(t)),r|=e[n],t&=~o;return r}function Ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Wt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Vt(24&~t))?Wt(10,t):e;case 10:return 0===(e=Vt(192&~t))?Wt(8,t):e;case 8:return 0===(e=Vt(3584&~t))&&(0===(e=Vt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=Vt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Vt(e){return e&-e}function Ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Kt(t)]=n}var Kt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(zt(e)/Gt|0)|0},zt=Math.log,Gt=Math.LN2;var qt=i.unstable_UserBlockingPriority,Yt=i.unstable_runWithPriority,$t=!0;function Xt(e,t,n,r){Be||xe();var o=Jt,i=Be;Be=!0;try{Le(o,e,t,n,r)}finally{(Be=i)||Fe()}}function Qt(e,t,n,r){Yt(qt,Jt.bind(null,e,t,n,r))}function Jt(e,t,n,r){var o;if($t)if((o=0==(4&t))&&0<at.length&&-1<pt.indexOf(e))e=ht(null,e,t,n,r),at.push(e);else{var i=Zt(e,t,n,r);if(null===i)o&&ft(e,r);else{if(o){if(-1<pt.indexOf(e))return e=ht(i,e,t,n,r),void at.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return st=mt(st,e,t,n,r,o),!0;case"dragenter":return ct=mt(ct,e,t,n,r,o),!0;case"mouseover":return lt=mt(lt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ut.set(i,mt(ut.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,dt.set(i,mt(dt.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;ft(e,r)}xr(e,t,r,null,n)}}}function Zt(e,t,n,r){var o=Ae(r);if(null!==(o=no(o))){var i=Xe(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Qe(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return xr(e,t,r,o,n),null}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t,n=tn,r=n.length,o="value"in en?en.value:en.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return nn=o.slice(e,1<t?1-t:void 0)}function on(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function an(){return!0}function sn(){return!1}function cn(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?an:sn,this.isPropagationStopped=sn,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=an)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=an)},persist:function(){},isPersistent:an}),t}var ln,un,dn,_n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=cn(_n),hn=o({},_n,{view:0,detail:0}),fn=cn(hn),mn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dn&&(dn&&"mousemove"===e.type?(ln=e.screenX-dn.screenX,un=e.screenY-dn.screenY):un=ln=0,dn=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:un}}),vn=cn(mn),gn=cn(o({},mn,{dataTransfer:0})),yn=cn(o({},hn,{relatedTarget:0})),En=cn(o({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=o({},_n,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=cn(wn),Cn=cn(o({},_n,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Tn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},An={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=An[e])&&!!t[e]}function Pn(){return Dn}var On=o({},hn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=on(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Tn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pn,charCode:function(e){return"keypress"===e.type?on(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?on(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),In=cn(On),kn=cn(o({},mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=cn(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pn})),Mn=cn(o({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ln=o({},mn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),xn=cn(Ln),Nn=[9,13,27,32],Bn=d&&"CompositionEvent"in window,Un=null;d&&"documentMode"in document&&(Un=document.documentMode);var Fn=d&&"TextEvent"in window&&!Un,Wn=d&&(!Bn||Un&&8<Un&&11>=Un),Vn=String.fromCharCode(32),Hn=!1;function jn(e,t){switch(e){case"keyup":return-1!==Nn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1;var Gn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Gn[e.type]:"textarea"===t}function Yn(e,t,n,r){ke(r),0<(t=Br(t,"onChange")).length&&(n=new pn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $n=null,Xn=null;function Qn(e){Or(e,0)}function Jn(e){if(Q(oo(e)))return e}function Zn(e,t){if("change"===e)return t}var er=!1;if(d){var tr;if(d){var nr="oninput"in document;if(!nr){var rr=document.createElement("div");rr.setAttribute("oninput","return;"),nr="function"==typeof rr.oninput}tr=nr}else tr=!1;er=tr&&(!document.documentMode||9<document.documentMode)}function or(){$n&&($n.detachEvent("onpropertychange",ir),Xn=$n=null)}function ir(e){if("value"===e.propertyName&&Jn(Xn)){var t=[];if(Yn(t,Xn,e,Ae(e)),e=Qn,Be)e(t);else{Be=!0;try{Me(e,t)}finally{Be=!1,Fe()}}}}function ar(e,t,n){"focusin"===e?(or(),Xn=n,($n=t).attachEvent("onpropertychange",ir)):"focusout"===e&&or()}function sr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jn(Xn)}function cr(e,t){if("click"===e)return Jn(t)}function lr(e,t){if("input"===e||"change"===e)return Jn(t)}var ur="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},dr=Object.prototype.hasOwnProperty;function _r(e,t){if(ur(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!dr.call(t,n[r])||!ur(e[n[r]],t[n[r]]))return!1;return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=pr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=pr(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function mr(){for(var e=window,t=J();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=J((e=t.contentWindow).document)}return t}function vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var gr=d&&"documentMode"in document&&11>=document.documentMode,yr=null,Er=null,wr=null,br=!1;function Cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==yr||yr!==J(r)||("selectionStart"in(r=yr)&&vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&_r(wr,r)||(wr=r,0<(r=Br(Er,"onSelect")).length&&(t=new pn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}xt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),xt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),xt(Lt,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Tr=0;Tr<Sr.length;Tr++)Mt.set(Sr[Tr],0);u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ar="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Dr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ar));function Pr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,s,c,l){if($e.apply(this,arguments),Ke){if(!Ke)throw Error(a(198));var u=ze;Ke=!1,ze=null,Ge||(Ge=!0,qe=u)}}(r,t,void 0,e),e.currentTarget=null}function Or(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==i&&o.isPropagationStopped())break e;Pr(o,s,l),i=c}else for(a=0;a<r.length;a++){if(c=(s=r[a]).instance,l=s.currentTarget,s=s.listener,c!==i&&o.isPropagationStopped())break e;Pr(o,s,l),i=c}}}if(Ge)throw e=qe,Ge=!1,qe=null,e}function Ir(e,t){var n=ao(t),r=e+"__bubble";n.has(r)||(Lr(t,e,2,!1),n.add(r))}var kr="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){e[kr]||(e[kr]=!0,s.forEach((function(t){Dr.has(t)||Mr(t,!1,e,null),Mr(t,!0,e,null)})))}function Mr(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Dr.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=ao(i),s=e+"__"+(t?"capture":"bubble");a.has(s)||(t&&(o|=4),Lr(i,e,o,t),a.add(s))}function Lr(e,t,n,r){var o=Mt.get(t);switch(void 0===o?2:o){case 0:o=Xt;break;case 1:o=Qt;break;default:o=Jt}n=o.bind(null,t,n,e),o=void 0,!Ve||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function xr(e,t,n,r,o){var i=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var c=a.tag;if((3===c||4===c)&&((c=a.stateNode.containerInfo)===o||8===c.nodeType&&c.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=no(s)))return;if(5===(c=a.tag)||6===c){r=i=a;continue e}s=s.parentNode}}r=r.return}!function(e,t,n){if(Ue)return e(t,n);Ue=!0;try{Ne(e,t,n)}finally{Ue=!1,Fe()}}((function(){var r=i,o=Ae(n),a=[];e:{var s=Rt.get(e);if(void 0!==s){var c=pn,l=e;switch(e){case"keypress":if(0===on(n))break e;case"keydown":case"keyup":c=In;break;case"focusin":l="focus",c=yn;break;case"focusout":l="blur",c=yn;break;case"beforeblur":case"afterblur":c=yn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=vn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=gn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=Rn;break;case Pt:case Ot:case It:c=En;break;case kt:c=Mn;break;case"scroll":c=fn;break;case"wheel":c=xn;break;case"copy":case"cut":case"paste":c=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=kn}var u=0!=(4&t),d=!u&&"scroll"===e,_=u?null!==s?s+"Capture":null:s;u=[];for(var p,h=r;null!==h;){var f=(p=h).stateNode;if(5===p.tag&&null!==f&&(p=f,null!==_&&(null!=(f=We(h,_))&&u.push(Nr(h,f,p)))),d)break;h=h.return}0<u.length&&(s=new c(s,l,null,n,o),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(l=n.relatedTarget||n.fromElement)||!no(l)&&!l[eo])&&(c||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,c?(c=r,null!==(l=(l=n.relatedTarget||n.toElement)?no(l):null)&&(l!==(d=Xe(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(c=null,l=r),c!==l)){if(u=vn,f="onMouseLeave",_="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=kn,f="onPointerLeave",_="onPointerEnter",h="pointer"),d=null==c?s:oo(c),p=null==l?s:oo(l),(s=new u(f,h+"leave",c,n,o)).target=d,s.relatedTarget=p,f=null,no(o)===r&&((u=new u(_,h+"enter",l,n,o)).target=p,u.relatedTarget=d,f=u),d=f,c&&l)e:{for(_=l,h=0,p=u=c;p;p=Ur(p))h++;for(p=0,f=_;f;f=Ur(f))p++;for(;0<h-p;)u=Ur(u),h--;for(;0<p-h;)_=Ur(_),p--;for(;h--;){if(u===_||null!==_&&u===_.alternate)break e;u=Ur(u),_=Ur(_)}u=null}else u=null;null!==c&&Fr(a,s,c,u,!1),null!==l&&null!==d&&Fr(a,d,l,u,!0)}if("select"===(c=(s=r?oo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===c&&"file"===s.type)var m=Zn;else if(qn(s))if(er)m=lr;else{m=sr;var v=ar}else(c=s.nodeName)&&"input"===c.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(m=cr);switch(m&&(m=m(e,r))?Yn(a,m,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&oe(s,"number",s.value)),v=r?oo(r):window,e){case"focusin":(qn(v)||"true"===v.contentEditable)&&(yr=v,Er=r,wr=null);break;case"focusout":wr=Er=yr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,Cr(a,n,o);break;case"selectionchange":if(gr)break;case"keydown":case"keyup":Cr(a,n,o)}var g;if(Bn)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else zn?jn(e,n)&&(y="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(y="onCompositionStart");y&&(Wn&&"ko"!==n.locale&&(zn||"onCompositionStart"!==y?"onCompositionEnd"===y&&zn&&(g=rn()):(tn="value"in(en=o)?en.value:en.textContent,zn=!0)),0<(v=Br(r,y)).length&&(y=new Cn(y,e,null,n,o),a.push({event:y,listeners:v}),g?y.data=g:null!==(g=Kn(n))&&(y.data=g))),(g=Fn?function(e,t){switch(e){case"compositionend":return Kn(t);case"keypress":return 32!==t.which?null:(Hn=!0,Vn);case"textInput":return(e=t.data)===Vn&&Hn?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!Bn&&jn(e,t)?(e=rn(),nn=tn=en=null,zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Wn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Br(r,"onBeforeInput")).length&&(o=new Cn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=g))}Or(a,t)}))}function Nr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Br(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=We(e,n))&&r.unshift(Nr(e,i,o)),null!=(i=We(e,t))&&r.push(Nr(e,i,o))),e=e.return}return r}function Ur(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Fr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(null!==c&&c===r)break;5===s.tag&&null!==l&&(s=l,o?null!=(c=We(n,i))&&a.unshift(Nr(n,c,s)):o||null!=(c=We(n,i))&&a.push(Nr(n,c,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function Wr(){}var Vr=null,Hr=null;function jr(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Kr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var zr="function"==typeof setTimeout?setTimeout:void 0,Gr="function"==typeof clearTimeout?clearTimeout:void 0;function qr(e){1===e.nodeType?e.textContent="":9===e.nodeType&&(null!=(e=e.body)&&(e.textContent=""))}function Yr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function $r(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Xr=0;var Qr=Math.random().toString(36).slice(2),Jr="__reactFiber$"+Qr,Zr="__reactProps$"+Qr,eo="__reactContainer$"+Qr,to="__reactEvents$"+Qr;function no(e){var t=e[Jr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[eo]||n[Jr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=$r(e);null!==e;){if(n=e[Jr])return n;e=$r(e)}return t}n=(e=n).parentNode}return null}function ro(e){return!(e=e[Jr]||e[eo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function oo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function io(e){return e[Zr]||null}function ao(e){var t=e[to];return void 0===t&&(t=e[to]=new Set),t}var so=[],co=-1;function lo(e){return{current:e}}function uo(e){0>co||(e.current=so[co],so[co]=null,co--)}function _o(e,t){co++,so[co]=e.current,e.current=t}var po={},ho=lo(po),fo=lo(!1),mo=po;function vo(e,t){var n=e.type.contextTypes;if(!n)return po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function go(e){return null!=(e=e.childContextTypes)}function yo(){uo(fo),uo(ho)}function Eo(e,t,n){if(ho.current!==po)throw Error(a(168));_o(ho,t),_o(fo,n)}function wo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,q(t)||"Unknown",i));return o({},n,r)}function bo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||po,mo=ho.current,_o(ho,e),_o(fo,fo.current),!0}function Co(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=wo(e,t,mo),r.__reactInternalMemoizedMergedChildContext=e,uo(fo),uo(ho),_o(ho,e)):uo(fo),_o(fo,n)}var So=null,To=null,Ao=i.unstable_runWithPriority,Do=i.unstable_scheduleCallback,Po=i.unstable_cancelCallback,Oo=i.unstable_shouldYield,Io=i.unstable_requestPaint,ko=i.unstable_now,Ro=i.unstable_getCurrentPriorityLevel,Mo=i.unstable_ImmediatePriority,Lo=i.unstable_UserBlockingPriority,xo=i.unstable_NormalPriority,No=i.unstable_LowPriority,Bo=i.unstable_IdlePriority,Uo={},Fo=void 0!==Io?Io:function(){},Wo=null,Vo=null,Ho=!1,jo=ko(),Ko=1e4>jo?ko:function(){return ko()-jo};function zo(){switch(Ro()){case Mo:return 99;case Lo:return 98;case xo:return 97;case No:return 96;case Bo:return 95;default:throw Error(a(332))}}function Go(e){switch(e){case 99:return Mo;case 98:return Lo;case 97:return xo;case 96:return No;case 95:return Bo;default:throw Error(a(332))}}function qo(e,t){return e=Go(e),Ao(e,t)}function Yo(e,t,n){return e=Go(e),Do(e,t,n)}function $o(){if(null!==Vo){var e=Vo;Vo=null,Po(e)}Xo()}function Xo(){if(!Ho&&null!==Wo){Ho=!0;var e=0;try{var t=Wo;qo(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Wo=null}catch(t){throw null!==Wo&&(Wo=Wo.slice(e+1)),Do(Mo,$o),t}finally{Ho=!1}}}var Qo=w.ReactCurrentBatchConfig;function Jo(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Zo=lo(null),ei=null,ti=null,ni=null;function ri(){ni=ti=ei=null}function oi(e){var t=Zo.current;uo(Zo),e.type._context._currentValue=t}function ii(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ai(e,t){ei=e,ni=ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Ba=!0),e.firstContext=null)}function si(e,t){if(ni!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ni=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ti){if(null===ei)throw Error(a(308));ti=t,ei.dependencies={lanes:0,firstContext:t,responders:null}}else ti=ti.next=t;return e._currentValue}var ci=!1;function li(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function ui(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function di(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _i(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function pi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;ci=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,c=i.shared.pending;if(null!==c){i.shared.pending=null;var l=c,u=l.next;l.next=null,null===s?a=u:s.next=u,s=l;var d=e.alternate;if(null!==d){var _=(d=d.updateQueue).lastBaseUpdate;_!==s&&(null===_?d.firstBaseUpdate=u:_.next=u,d.lastBaseUpdate=l)}}if(null!==a){for(_=i.baseState,s=0,d=u=l=null;;){c=a.lane;var p=a.eventTime;if((r&c)===c){null!==d&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var h=e,f=a;switch(c=t,p=n,f.tag){case 1:if("function"==typeof(h=f.payload)){_=h.call(p,_,c);break e}_=h;break e;case 3:h.flags=-4097&h.flags|64;case 0:if(null==(c="function"==typeof(h=f.payload)?h.call(p,_,c):h))break e;_=o({},_,c);break e;case 2:ci=!0}}null!==a.callback&&(e.flags|=32,null===(c=i.effects)?i.effects=[a]:c.push(a))}else p={eventTime:p,lane:c,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===d?(u=d=p,l=_):d=d.next=p,s|=c;if(null===(a=a.next)){if(null===(c=i.shared.pending))break;a=c.next,c.next=null,i.lastBaseUpdate=c,i.shared.pending=null}}null===d&&(l=_),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,Vs|=s,e.lanes=s,e.memoizedState=_}}function fi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var mi=(new r.Component).refs;function vi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var gi={isMounted:function(e){return!!(e=e._reactInternals)&&Xe(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_c(),o=pc(e),i=di(r,o);i.payload=t,null!=n&&(i.callback=n),_i(e,i),hc(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_c(),o=pc(e),i=di(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),_i(e,i),hc(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_c(),r=pc(e),o=di(n,r);o.tag=2,null!=t&&(o.callback=t),_i(e,o),hc(e,r,n)}};function yi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!_r(n,r)||!_r(o,i))}function Ei(e,t,n){var r=!1,o=po,i=t.contextType;return"object"==typeof i&&null!==i?i=si(i):(o=go(t)?mo:ho.current,i=(r=null!=(r=t.contextTypes))?vo(e,o):po),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=gi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function wi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gi.enqueueReplaceState(t,t.state,null)}function bi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=mi,li(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=si(i):(i=go(t)?mo:ho.current,o.context=vo(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(vi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&gi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4)}var Ci=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===mi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Ti(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Ai(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Gc(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=Xc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=qc(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Yc(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function _(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Xc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case b:return(n=qc(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case C:return(t=Qc(t,e.mode,n)).return=e,t}if(Ci(t)||H(t))return(t=Yc(t,e.mode,n,null)).return=e,t;Ti(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:c(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case b:return n.key===o?n.type===S?d(e,t,n.props.children,r,o):l(e,t,n,r):null;case C:return n.key===o?u(e,t,n,r):null}if(Ci(n)||H(n))return null!==o?null:d(e,t,n,r,null);Ti(e,n)}return null}function h(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return c(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case b:return e=e.get(null===r.key?n:r.key)||null,r.type===S?d(t,e,r.props.children,o,r.key):l(t,e,r,o);case C:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(Ci(r)||H(r))return d(t,e=e.get(n)||null,r,o,null);Ti(t,r)}return null}function f(o,a,s,c){for(var l=null,u=null,d=a,f=a=0,m=null;null!==d&&f<s.length;f++){d.index>f?(m=d,d=null):m=d.sibling;var v=p(o,d,s[f],c);if(null===v){null===d&&(d=m);break}e&&d&&null===v.alternate&&t(o,d),a=i(v,a,f),null===u?l=v:u.sibling=v,u=v,d=m}if(f===s.length)return n(o,d),l;if(null===d){for(;f<s.length;f++)null!==(d=_(o,s[f],c))&&(a=i(d,a,f),null===u?l=d:u.sibling=d,u=d);return l}for(d=r(o,d);f<s.length;f++)null!==(m=h(d,o,f,s[f],c))&&(e&&null!==m.alternate&&d.delete(null===m.key?f:m.key),a=i(m,a,f),null===u?l=m:u.sibling=m,u=m);return e&&d.forEach((function(e){return t(o,e)})),l}function m(o,s,c,l){var u=H(c);if("function"!=typeof u)throw Error(a(150));if(null==(c=u.call(c)))throw Error(a(151));for(var d=u=null,f=s,m=s=0,v=null,g=c.next();null!==f&&!g.done;m++,g=c.next()){f.index>m?(v=f,f=null):v=f.sibling;var y=p(o,f,g.value,l);if(null===y){null===f&&(f=v);break}e&&f&&null===y.alternate&&t(o,f),s=i(y,s,m),null===d?u=y:d.sibling=y,d=y,f=v}if(g.done)return n(o,f),u;if(null===f){for(;!g.done;m++,g=c.next())null!==(g=_(o,g.value,l))&&(s=i(g,s,m),null===d?u=g:d.sibling=g,d=g);return u}for(f=r(o,f);!g.done;m++,g=c.next())null!==(g=h(f,o,m,g.value,l))&&(e&&null!==g.alternate&&f.delete(null===g.key?m:g.key),s=i(g,s,m),null===d?u=g:d.sibling=g,d=g);return e&&f.forEach((function(e){return t(o,e)})),u}return function(e,r,i,c){var l="object"==typeof i&&null!==i&&i.type===S&&null===i.key;l&&(i=i.props.children);var u="object"==typeof i&&null!==i;if(u)switch(i.$$typeof){case b:e:{for(u=i.key,l=r;null!==l;){if(l.key===u){if(7===l.tag){if(i.type===S){n(e,l.sibling),(r=o(l,i.props.children)).return=e,e=r;break e}}else if(l.elementType===i.type){n(e,l.sibling),(r=o(l,i.props)).ref=Si(e,l,i),r.return=e,e=r;break e}n(e,l);break}t(e,l),l=l.sibling}i.type===S?((r=Yc(i.props.children,e.mode,c,i.key)).return=e,e=r):((c=qc(i.type,i.key,i.props,null,e.mode,c)).ref=Si(e,r,i),c.return=e,e=c)}return s(e);case C:e:{for(l=i.key;null!==r;){if(r.key===l){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Qc(i,e.mode,c)).return=e,e=r}return s(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Xc(i,e.mode,c)).return=e,e=r),s(e);if(Ci(i))return f(e,r,i,c);if(H(i))return m(e,r,i,c);if(u&&Ti(e,i),void 0===i&&!l)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,q(e.type)||"Component"))}return n(e,r)}}var Di=Ai(!0),Pi=Ai(!1),Oi={},Ii=lo(Oi),ki=lo(Oi),Ri=lo(Oi);function Mi(e){if(e===Oi)throw Error(a(174));return e}function Li(e,t){switch(_o(Ri,t),_o(ki,e),_o(Ii,Oi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}uo(Ii),_o(Ii,t)}function xi(){uo(Ii),uo(ki),uo(Ri)}function Ni(e){Mi(Ri.current);var t=Mi(Ii.current),n=he(t,e.type);t!==n&&(_o(ki,e),_o(Ii,n))}function Bi(e){ki.current===e&&(uo(Ii),uo(ki))}var Ui=lo(0);function Fi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wi=null,Vi=null,Hi=!1;function ji(e,t){var n=Kc(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Ki(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function zi(e){if(Hi){var t=Vi;if(t){var n=t;if(!Ki(e,t)){if(!(t=Yr(n.nextSibling))||!Ki(e,t))return e.flags=-1025&e.flags|2,Hi=!1,void(Wi=e);ji(Wi,n)}Wi=e,Vi=Yr(t.firstChild)}else e.flags=-1025&e.flags|2,Hi=!1,Wi=e}}function Gi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Wi=e}function qi(e){if(e!==Wi)return!1;if(!Hi)return Gi(e),Hi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Kr(t,e.memoizedProps))for(t=Vi;t;)ji(e,t),t=Yr(t.nextSibling);if(Gi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Vi=Yr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Vi=null}}else Vi=Wi?Yr(e.stateNode.nextSibling):null;return!0}function Yi(){Vi=Wi=null,Hi=!1}var $i=[];function Xi(){for(var e=0;e<$i.length;e++)$i[e]._workInProgressVersionPrimary=null;$i.length=0}var Qi=w.ReactCurrentDispatcher,Ji=w.ReactCurrentBatchConfig,Zi=0,ea=null,ta=null,na=null,ra=!1,oa=!1;function ia(){throw Error(a(321))}function aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function sa(e,t,n,r,o,i){if(Zi=i,ea=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Qi.current=null===e||null===e.memoizedState?Ma:La,e=n(r,o),oa){i=0;do{if(oa=!1,!(25>i))throw Error(a(301));i+=1,na=ta=null,t.updateQueue=null,Qi.current=xa,e=n(r,o)}while(oa)}if(Qi.current=Ra,t=null!==ta&&null!==ta.next,Zi=0,na=ta=ea=null,ra=!1,t)throw Error(a(300));return e}function ca(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===na?ea.memoizedState=na=e:na=na.next=e,na}function la(){if(null===ta){var e=ea.alternate;e=null!==e?e.memoizedState:null}else e=ta.next;var t=null===na?ea.memoizedState:na.next;if(null!==t)na=t,ta=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ta=e).memoizedState,baseState:ta.baseState,baseQueue:ta.baseQueue,queue:ta.queue,next:null},null===na?ea.memoizedState=na=e:na=na.next=e}return na}function ua(e,t){return"function"==typeof t?t(e):t}function da(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ta,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var c=s=i=null,l=o;do{var u=l.lane;if((Zi&u)===u)null!==c&&(c=c.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var d={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===c?(s=c=d,i=r):c=c.next=d,ea.lanes|=u,Vs|=u}l=l.next}while(null!==l&&l!==o);null===c?i=r:c.next=s,ur(r,t.memoizedState)||(Ba=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function _a(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{i=e(i,s.action),s=s.next}while(s!==o);ur(i,t.memoizedState)||(Ba=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pa(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Zi&e)===e)&&(t._workInProgressVersionPrimary=r,$i.push(t))),e)return n(t._source);throw $i.push(t),Error(a(350))}function ha(e,t,n,r){var o=Ms;if(null===o)throw Error(a(349));var i=t._getVersion,s=i(t._source),c=Qi.current,l=c.useState((function(){return pa(o,t,n)})),u=l[1],d=l[0];l=na;var _=e.memoizedState,p=_.refs,h=p.getSnapshot,f=_.source;_=_.subscribe;var m=ea;return e.memoizedState={refs:p,source:t,subscribe:r},c.useEffect((function(){p.getSnapshot=n,p.setSnapshot=u;var e=i(t._source);if(!ur(s,e)){e=n(t._source),ur(d,e)||(u(e),e=pc(m),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var c=31-Kt(a),l=1<<c;r[c]|=e,a&=~l}}}),[n,t,r]),c.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=pc(m);o.mutableReadLanes|=r&o.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),ur(h,n)&&ur(f,t)&&ur(_,r)||((e={pending:null,dispatch:null,lastRenderedReducer:ua,lastRenderedState:d}).dispatch=u=ka.bind(null,ea,e),l.queue=e,l.baseQueue=null,d=pa(o,t,n),l.memoizedState=l.baseState=d),d}function fa(e,t,n){return ha(la(),e,t,n)}function ma(e){var t=ca();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:ua,lastRenderedState:e}).dispatch=ka.bind(null,ea,e),[t.memoizedState,e]}function va(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ea.updateQueue)?(t={lastEffect:null},ea.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ga(e){return e={current:e},ca().memoizedState=e}function ya(){return la().memoizedState}function Ea(e,t,n,r){var o=ca();ea.flags|=e,o.memoizedState=va(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var o=la();r=void 0===r?null:r;var i=void 0;if(null!==ta){var a=ta.memoizedState;if(i=a.destroy,null!==r&&aa(r,a.deps))return void va(t,n,i,r)}ea.flags|=e,o.memoizedState=va(1|t,n,i,r)}function ba(e,t){return Ea(516,4,e,t)}function Ca(e,t){return wa(516,4,e,t)}function Sa(e,t){return wa(4,2,e,t)}function Ta(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Aa(e,t,n){return n=null!=n?n.concat([e]):null,wa(4,2,Ta.bind(null,t,e),n)}function Da(){}function Pa(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Oa(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ia(e,t){var n=zo();qo(98>n?98:n,(function(){e(!0)})),qo(97<n?97:n,(function(){var n=Ji.transition;Ji.transition=1;try{e(!1),t()}finally{Ji.transition=n}}))}function ka(e,t,n){var r=_c(),o=pc(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===ea||null!==a&&a===ea)oa=ra=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,c=a(s,n);if(i.eagerReducer=a,i.eagerState=c,ur(c,s))return}catch(e){}hc(e,o,r)}}var Ra={readContext:si,useCallback:ia,useContext:ia,useEffect:ia,useImperativeHandle:ia,useLayoutEffect:ia,useMemo:ia,useReducer:ia,useRef:ia,useState:ia,useDebugValue:ia,useDeferredValue:ia,useTransition:ia,useMutableSource:ia,useOpaqueIdentifier:ia,unstable_isNewReconciler:!1},Ma={readContext:si,useCallback:function(e,t){return ca().memoizedState=[e,void 0===t?null:t],e},useContext:si,useEffect:ba,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ea(4,2,Ta.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ea(4,2,e,t)},useMemo:function(e,t){var n=ca();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ca();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ka.bind(null,ea,e),[r.memoizedState,e]},useRef:ga,useState:ma,useDebugValue:Da,useDeferredValue:function(e){var t=ma(e),n=t[0],r=t[1];return ba((function(){var t=Ji.transition;Ji.transition=1;try{r(e)}finally{Ji.transition=t}}),[e]),n},useTransition:function(){var e=ma(!1),t=e[0];return ga(e=Ia.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ca();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Hi){var e=!1,t=function(e){return{$$typeof:x,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Xr++).toString(36))),Error(a(355))})),n=ma(t)[1];return 0==(2&ea.mode)&&(ea.flags|=516,va(5,(function(){n("r:"+(Xr++).toString(36))}),void 0,null)),t}return ma(t="r:"+(Xr++).toString(36)),t},unstable_isNewReconciler:!1},La={readContext:si,useCallback:Pa,useContext:si,useEffect:Ca,useImperativeHandle:Aa,useLayoutEffect:Sa,useMemo:Oa,useReducer:da,useRef:ya,useState:function(){return da(ua)},useDebugValue:Da,useDeferredValue:function(e){var t=da(ua),n=t[0],r=t[1];return Ca((function(){var t=Ji.transition;Ji.transition=1;try{r(e)}finally{Ji.transition=t}}),[e]),n},useTransition:function(){var e=da(ua)[0];return[ya().current,e]},useMutableSource:fa,useOpaqueIdentifier:function(){return da(ua)[0]},unstable_isNewReconciler:!1},xa={readContext:si,useCallback:Pa,useContext:si,useEffect:Ca,useImperativeHandle:Aa,useLayoutEffect:Sa,useMemo:Oa,useReducer:_a,useRef:ya,useState:function(){return _a(ua)},useDebugValue:Da,useDeferredValue:function(e){var t=_a(ua),n=t[0],r=t[1];return Ca((function(){var t=Ji.transition;Ji.transition=1;try{r(e)}finally{Ji.transition=t}}),[e]),n},useTransition:function(){var e=_a(ua)[0];return[ya().current,e]},useMutableSource:fa,useOpaqueIdentifier:function(){return _a(ua)[0]},unstable_isNewReconciler:!1},Na=w.ReactCurrentOwner,Ba=!1;function Ua(e,t,n,r){t.child=null===e?Pi(t,null,n,r):Di(t,e.child,n,r)}function Fa(e,t,n,r,o){n=n.render;var i=t.ref;return ai(t,o),r=sa(e,t,n,r,i,o),null===e||Ba?(t.flags|=1,Ua(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function Wa(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||zc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=qc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Va(e,t,a,r,o,i))}return a=e.child,0==(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:_r)(o,r)&&e.ref===t.ref)?is(e,t,i):(t.flags|=1,(e=Gc(a,r)).ref=t.ref,e.return=t,t.child=e)}function Va(e,t,n,r,o,i){if(null!==e&&_r(e.memoizedProps,r)&&e.ref===t.ref){if(Ba=!1,0==(i&o))return t.lanes=e.lanes,is(e,t,i);0!=(16384&e.flags)&&(Ba=!0)}return Ka(e,t,n,r,i)}function Ha(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},bc(t,n);else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},bc(t,e),null;t.memoizedState={baseLanes:0},bc(t,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,bc(t,r);return Ua(e,t,o,n),t.child}function ja(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ka(e,t,n,r,o){var i=go(n)?mo:ho.current;return i=vo(t,i),ai(t,o),n=sa(e,t,n,r,i,o),null===e||Ba?(t.flags|=1,Ua(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,is(e,t,o))}function za(e,t,n,r,o){if(go(n)){var i=!0;bo(t)}else i=!1;if(ai(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),Ei(t,n,r),bi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,l=n.contextType;"object"==typeof l&&null!==l?l=si(l):l=vo(t,l=go(n)?mo:ho.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||c!==l)&&wi(t,a,r,l),ci=!1;var _=t.memoizedState;a.state=_,hi(t,r,a,o),c=t.memoizedState,s!==r||_!==c||fo.current||ci?("function"==typeof u&&(vi(t,n,u,r),c=t.memoizedState),(s=ci||yi(t,n,s,r,_,c,l))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4)):("function"==typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=l,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,ui(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Jo(t.type,s),a.props=l,d=t.pendingProps,_=a.context,"object"==typeof(c=n.contextType)&&null!==c?c=si(c):c=vo(t,c=go(n)?mo:ho.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||_!==c)&&wi(t,a,r,c),ci=!1,_=t.memoizedState,a.state=_,hi(t,r,a,o);var h=t.memoizedState;s!==d||_!==h||fo.current||ci?("function"==typeof p&&(vi(t,n,p,r),h=t.memoizedState),(l=ci||yi(t,n,l,r,_,h,c))?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,c),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,c)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&_===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=c,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&_===e.memoizedState||(t.flags|=256),r=!1)}return Ga(e,t,n,r,i,o)}function Ga(e,t,n,r,o,i){ja(e,t);var a=0!=(64&t.flags);if(!r&&!a)return o&&Co(t,n,!1),is(e,t,i);r=t.stateNode,Na.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Di(t,e.child,null,i),t.child=Di(t,null,s,i)):Ua(e,t,s,i),t.memoizedState=r.state,o&&Co(t,n,!0),t.child}function qa(e){var t=e.stateNode;t.pendingContext?Eo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Eo(0,t.context,!1),Li(e,t.containerInfo)}var Ya,$a,Xa,Qa={dehydrated:null,retryLane:0};function Ja(e,t,n){var r,o=t.pendingProps,i=Ui.current,a=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),_o(Ui,1&i),null===e?(void 0!==o.fallback&&zi(t),e=o.children,i=o.fallback,a?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,e):"number"==typeof o.unstable_expectedLoadTime?(e=Za(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Qa,t.lanes=33554432,e):((n=$c({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=ts(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Qa,o):(n=es(e,t,o.children,n),t.memoizedState=null,n))}function Za(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0==(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=$c(t,o,0,null),n=Yc(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function es(e,t,n,r){var o=e.child;return e=o.sibling,n=Gc(o,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ts(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var s={mode:"hidden",children:n};return 0==(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=s,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Gc(a,s),null!==e?r=Gc(e,r):(r=Yc(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ns(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),ii(e.return,t)}function rs(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function os(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ua(e,t,r.children,n),0!=(2&(r=Ui.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ns(e,n);else if(19===e.tag)ns(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(_o(Ui,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Fi(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Fi(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,i,t.lastEffect);break;case"together":rs(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function is(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Vs|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Gc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Gc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function as(e,t){if(!Hi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ss(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return go(t.type)&&yo(),null;case 3:return xi(),uo(fo),uo(ho),Xi(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(qi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Bi(t);var i=Mi(Ri.current);if(n=t.type,null!==e&&null!=t.stateNode)$a(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Mi(Ii.current),qi(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Jr]=t,r[Zr]=s,n){case"dialog":Ir("cancel",r),Ir("close",r);break;case"iframe":case"object":case"embed":Ir("load",r);break;case"video":case"audio":for(e=0;e<Ar.length;e++)Ir(Ar[e],r);break;case"source":Ir("error",r);break;case"img":case"image":case"link":Ir("error",r),Ir("load",r);break;case"details":Ir("toggle",r);break;case"input":ee(r,s),Ir("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Ir("invalid",r);break;case"textarea":ce(r,s),Ir("invalid",r)}for(var l in Se(n,s),e=null,s)s.hasOwnProperty(l)&&(i=s[l],"children"===l?"string"==typeof i?r.textContent!==i&&(e=["children",i]):"number"==typeof i&&r.textContent!==""+i&&(e=["children",""+i]):c.hasOwnProperty(l)&&null!=i&&"onScroll"===l&&Ir("scroll",r));switch(n){case"input":X(r),re(r,s,!0);break;case"textarea":X(r),ue(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=Wr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(l=9===i.nodeType?i:i.ownerDocument,e===de&&(e=pe(n)),e===de?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Jr]=t,e[Zr]=r,Ya(e,t),t.stateNode=e,l=Te(n,r),n){case"dialog":Ir("cancel",e),Ir("close",e),i=r;break;case"iframe":case"object":case"embed":Ir("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ar.length;i++)Ir(Ar[i],e);i=r;break;case"source":Ir("error",e),i=r;break;case"img":case"image":case"link":Ir("error",e),Ir("load",e),i=r;break;case"details":Ir("toggle",e),i=r;break;case"input":ee(e,r),i=Z(e,r),Ir("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Ir("invalid",e);break;case"textarea":ce(e,r),i=se(e,r),Ir("invalid",e);break;default:i=r}Se(n,i);var u=i;for(s in u)if(u.hasOwnProperty(s)){var d=u[s];"style"===s?be(e,d):"dangerouslySetInnerHTML"===s?null!=(d=d?d.__html:void 0)&&ve(e,d):"children"===s?"string"==typeof d?("textarea"!==n||""!==d)&&ge(e,d):"number"==typeof d&&ge(e,""+d):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(c.hasOwnProperty(s)?null!=d&&"onScroll"===s&&Ir("scroll",e):null!=d&&E(e,s,d,l))}switch(n){case"input":X(e),re(e,r,!1);break;case"textarea":X(e),ue(e);break;case"option":null!=r.value&&e.setAttribute("value",""+Y(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ae(e,!!r.multiple,s,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Wr)}jr(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Xa(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Mi(Ri.current),Mi(Ii.current),qi(t)?(r=t.stateNode,n=t.memoizedProps,r[Jr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Jr]=t,t.stateNode=r)}return null;case 13:return uo(Ui),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&qi(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ui.current)?0===Us&&(Us=3):(0!==Us&&3!==Us||(Us=4),null===Ms||0==(134217727&Vs)&&0==(134217727&Hs)||gc(Ms,xs))),(r||n)&&(t.flags|=4),null);case 4:return xi(),null===e&&Rr(t.stateNode.containerInfo),null;case 10:return oi(t),null;case 19:if(uo(Ui),null===(r=t.memoizedState))return null;if(s=0!=(64&t.flags),null===(l=r.rendering))if(s)as(r,!1);else{if(0!==Us||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(l=Fi(e))){for(t.flags|=64,as(r,!1),null!==(s=l.updateQueue)&&(t.updateQueue=s,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=2,s.nextEffect=null,s.firstEffect=null,s.lastEffect=null,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return _o(Ui,1&Ui.current|2),t.child}e=e.sibling}null!==r.tail&&Ko()>Gs&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432)}else{if(!s)if(null!==(e=Fi(l))){if(t.flags|=64,s=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),as(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate&&!Hi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Ko()-r.renderingStartTime>Gs&&1073741824!==n&&(t.flags|=64,s=!0,as(r,!1),t.lanes=33554432);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ko(),n.sibling=null,t=Ui.current,_o(Ui,s?1&t|2:1&t),n):null;case 23:case 24:return Cc(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function cs(e){switch(e.tag){case 1:go(e.type)&&yo();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(xi(),uo(fo),uo(ho),Xi(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Bi(e),null;case 13:return uo(Ui),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return uo(Ui),null;case 4:return xi(),null;case 10:return oi(e),null;case 23:case 24:return Cc(),null;default:return null}}function ls(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o}}function us(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Ya=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},$a=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Mi(Ii.current);var a,s=null;switch(n){case"input":i=Z(e,i),r=Z(e,r),s=[];break;case"option":i=ie(e,i),r=ie(e,r),s=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),s=[];break;case"textarea":i=se(e,i),r=se(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Wr)}for(d in Se(n,r),n=null,i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&null!=i[d])if("style"===d){var l=i[d];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==d&&"children"!==d&&"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&"autoFocus"!==d&&(c.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var u=r[d];if(l=null!=i?i[d]:void 0,r.hasOwnProperty(d)&&u!==l&&(null!=u||null!=l))if("style"===d)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(d,n)),n=u;else"dangerouslySetInnerHTML"===d?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(d,u)):"children"===d?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(d,""+u):"suppressContentEditableWarning"!==d&&"suppressHydrationWarning"!==d&&(c.hasOwnProperty(d)?(null!=u&&"onScroll"===d&&Ir("scroll",e),s||l===u||(s=[])):"object"==typeof u&&null!==u&&u.$$typeof===x?u.toString():(s=s||[]).push(d,u))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}},Xa=function(e,t,n,r){n!==r&&(t.flags|=4)};var ds="function"==typeof WeakMap?WeakMap:Map;function _s(e,t,n){(n=di(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Xs||(Xs=!0,Qs=r),us(0,t)},n}function ps(e,t,n){(n=di(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return us(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Js?Js=new Set([this]):Js.add(this),us(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var hs="function"==typeof WeakSet?WeakSet:Set;function fs(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Wc(e,t)}else t.current=null}function ms(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Jo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&qr(t.stateNode.containerInfo))}throw Error(a(163))}function vs(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!=(4&(o=o.tag))&&0!=(1&o)&&(Bc(n,e),Nc(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Jo(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&fi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}fi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&jr(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&bt(n)))))}throw Error(a(163))}function gs(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=null!=o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function ys(e,t){if(To&&"function"==typeof To.onCommitFiberUnmount)try{To.onCommitFiberUnmount(So,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!=(4&r))Bc(t,n);else{r=t;try{o()}catch(e){Wc(r,e)}}n=n.next}while(n!==e)}break;case 1:if(fs(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Wc(t,e)}break;case 5:fs(t);break;case 4:Ts(e,t)}}function Es(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function ws(e){return 5===e.tag||3===e.tag||4===e.tag}function bs(e){e:{for(var t=e.return;null!==t;){if(ws(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(ge(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ws(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Cs(e,n,t):Ss(e,n,t)}function Cs(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Wr));else if(4!==r&&null!==(e=e.child))for(Cs(e,t,n),e=e.sibling;null!==e;)Cs(e,t,n),e=e.sibling}function Ss(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Ss(e,t,n),e=e.sibling;null!==e;)Ss(e,t,n),e=e.sibling}function Ts(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var s=e,c=o,l=c;;)if(ys(s,l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===c)break e;for(;null===l.sibling;){if(null===l.return||l.return===c)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}r?(s=n,c=o.stateNode,8===s.nodeType?s.parentNode.removeChild(c):s.removeChild(c)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(ys(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function As(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Zr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),Te(e,o),t=Te(e,r),o=0;o<i.length;o+=2){var s=i[o],c=i[o+1];"style"===s?be(n,c):"dangerouslySetInnerHTML"===s?ve(n,c):"children"===s?ge(n,c):E(n,s,c,t)}switch(e){case"input":ne(n,r);break;case"textarea":le(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,bt(n.containerInfo)));case 13:return null!==t.memoizedState&&(zs=Ko(),gs(t.child,!0)),void Ds(t);case 19:return void Ds(t);case 23:case 24:return void gs(t,null!==t.memoizedState)}throw Error(a(163))}function Ds(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new hs),t.forEach((function(t){var r=Hc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ps(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Os=Math.ceil,Is=w.ReactCurrentDispatcher,ks=w.ReactCurrentOwner,Rs=0,Ms=null,Ls=null,xs=0,Ns=0,Bs=lo(0),Us=0,Fs=null,Ws=0,Vs=0,Hs=0,js=0,Ks=null,zs=0,Gs=1/0;function qs(){Gs=Ko()+500}var Ys,$s=null,Xs=!1,Qs=null,Js=null,Zs=!1,ec=null,tc=90,nc=[],rc=[],oc=null,ic=0,ac=null,sc=-1,cc=0,lc=0,uc=null,dc=!1;function _c(){return 0!=(48&Rs)?Ko():-1!==sc?sc:sc=Ko()}function pc(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===zo()?1:2;if(0===cc&&(cc=Ws),0!==Qo.transition){0!==lc&&(lc=null!==Ks?Ks.pendingLanes:0),e=cc;var t=4186112&~lc;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=zo(),0!=(4&Rs)&&98===e?e=Wt(12,cc):e=Wt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),cc),e}function hc(e,t,n){if(50<ic)throw ic=0,ac=null,Error(a(185));if(null===(e=fc(e,t)))return null;jt(e,t,n),e===Ms&&(Hs|=t,4===Us&&gc(e,xs));var r=zo();1===t?0!=(8&Rs)&&0==(48&Rs)?yc(e):(mc(e,n),0===Rs&&(qs(),$o())):(0==(4&Rs)||98!==r&&99!==r||(null===oc?oc=new Set([e]):oc.add(e)),mc(e,n)),Ks=e}function fc(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function mc(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var c=31-Kt(s),l=1<<c,u=i[c];if(-1===u){if(0==(l&r)||0!=(l&o)){u=t,Bt(l);var d=Nt;i[c]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Ut(e,e===Ms?xs:0),t=Nt,0===r)null!==n&&(n!==Uo&&Po(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Uo&&Po(n)}15===t?(n=yc.bind(null,e),null===Wo?(Wo=[n],Vo=Do(Mo,Xo)):Wo.push(n),n=Uo):14===t?n=Yo(99,yc.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Yo(n,vc.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function vc(e){if(sc=-1,lc=cc=0,0!=(48&Rs))throw Error(a(327));var t=e.callbackNode;if(xc()&&e.callbackNode!==t)return null;var n=Ut(e,e===Ms?xs:0);if(0===n)return null;var r=n,o=Rs;Rs|=16;var i=Ac();for(Ms===e&&xs===r||(qs(),Sc(e,r));;)try{Oc();break}catch(t){Tc(e,t)}if(ri(),Is.current=i,Rs=o,null!==Ls?r=0:(Ms=null,xs=0,r=Us),0!=(Ws&Hs))Sc(e,0);else if(0!==r){if(2===r&&(Rs|=64,e.hydrate&&(e.hydrate=!1,qr(e.containerInfo)),0!==(n=Ft(e))&&(r=Dc(e,n))),1===r)throw t=Fs,Sc(e,0),gc(e,n),mc(e,Ko()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Rc(e);break;case 3:if(gc(e,n),(62914560&n)===n&&10<(r=zs+500-Ko())){if(0!==Ut(e,0))break;if(((o=e.suspendedLanes)&n)!==n){_c(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=zr(Rc.bind(null,e),r);break}Rc(e);break;case 4:if(gc(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Kt(n);i=1<<s,(s=r[s])>o&&(o=s),n&=~i}if(n=o,10<(n=(120>(n=Ko()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Os(n/1960))-n)){e.timeoutHandle=zr(Rc.bind(null,e),n);break}Rc(e);break;default:throw Error(a(329))}}return mc(e,Ko()),e.callbackNode===t?vc.bind(null,e):null}function gc(e,t){for(t&=~js,t&=~Hs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Kt(t),r=1<<n;e[n]=-1,t&=~r}}function yc(e){if(0!=(48&Rs))throw Error(a(327));if(xc(),e===Ms&&0!=(e.expiredLanes&xs)){var t=xs,n=Dc(e,t);0!=(Ws&Hs)&&(n=Dc(e,t=Ut(e,t)))}else n=Dc(e,t=Ut(e,0));if(0!==e.tag&&2===n&&(Rs|=64,e.hydrate&&(e.hydrate=!1,qr(e.containerInfo)),0!==(t=Ft(e))&&(n=Dc(e,t))),1===n)throw n=Fs,Sc(e,0),gc(e,t),mc(e,Ko()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rc(e),mc(e,Ko()),null}function Ec(e,t){var n=Rs;Rs|=1;try{return e(t)}finally{0===(Rs=n)&&(qs(),$o())}}function wc(e,t){var n=Rs;Rs&=-2,Rs|=8;try{return e(t)}finally{0===(Rs=n)&&(qs(),$o())}}function bc(e,t){_o(Bs,Ns),Ns|=t,Ws|=t}function Cc(){Ns=Bs.current,uo(Bs)}function Sc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Gr(n)),null!==Ls)for(n=Ls.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&yo();break;case 3:xi(),uo(fo),uo(ho),Xi();break;case 5:Bi(r);break;case 4:xi();break;case 13:case 19:uo(Ui);break;case 10:oi(r);break;case 23:case 24:Cc()}n=n.return}Ms=e,Ls=Gc(e.current,null),xs=Ns=Ws=t,Us=0,Fs=null,js=Hs=Vs=0}function Tc(e,t){for(;;){var n=Ls;try{if(ri(),Qi.current=Ra,ra){for(var r=ea.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ra=!1}if(Zi=0,na=ta=ea=null,oa=!1,ks.current=null,null===n||null===n.return){Us=1,Fs=t,Ls=null;break}e:{var i=e,a=n.return,s=n,c=t;if(t=xs,s.flags|=2048,s.firstEffect=s.lastEffect=null,null!==c&&"object"==typeof c&&"function"==typeof c.then){var l=c;if(0==(2&s.mode)){var u=s.alternate;u?(s.updateQueue=u.updateQueue,s.memoizedState=u.memoizedState,s.lanes=u.lanes):(s.updateQueue=null,s.memoizedState=null)}var d=0!=(1&Ui.current),_=a;do{var p;if(p=13===_.tag){var h=_.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var f=_.memoizedProps;p=void 0!==f.fallback&&(!0!==f.unstable_avoidThisFallback||!d)}}if(p){var m=_.updateQueue;if(null===m){var v=new Set;v.add(l),_.updateQueue=v}else m.add(l);if(0==(2&_.mode)){if(_.flags|=64,s.flags|=16384,s.flags&=-2981,1===s.tag)if(null===s.alternate)s.tag=17;else{var g=di(-1,1);g.tag=2,_i(s,g)}s.lanes|=1;break e}c=void 0,s=t;var y=i.pingCache;if(null===y?(y=i.pingCache=new ds,c=new Set,y.set(l,c)):void 0===(c=y.get(l))&&(c=new Set,y.set(l,c)),!c.has(s)){c.add(s);var E=Vc.bind(null,i,l,s);l.then(E,E)}_.flags|=4096,_.lanes=t;break e}_=_.return}while(null!==_);c=Error((q(s.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Us&&(Us=2),c=ls(c,s),_=a;do{switch(_.tag){case 3:i=c,_.flags|=4096,t&=-t,_.lanes|=t,pi(_,_s(0,i,t));break e;case 1:i=c;var w=_.type,b=_.stateNode;if(0==(64&_.flags)&&("function"==typeof w.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Js||!Js.has(b)))){_.flags|=4096,t&=-t,_.lanes|=t,pi(_,ps(_,i,t));break e}}_=_.return}while(null!==_)}kc(n)}catch(e){t=e,Ls===n&&null!==n&&(Ls=n=n.return);continue}break}}function Ac(){var e=Is.current;return Is.current=Ra,null===e?Ra:e}function Dc(e,t){var n=Rs;Rs|=16;var r=Ac();for(Ms===e&&xs===t||Sc(e,t);;)try{Pc();break}catch(t){Tc(e,t)}if(ri(),Rs=n,Is.current=r,null!==Ls)throw Error(a(261));return Ms=null,xs=0,Us}function Pc(){for(;null!==Ls;)Ic(Ls)}function Oc(){for(;null!==Ls&&!Oo();)Ic(Ls)}function Ic(e){var t=Ys(e.alternate,e,Ns);e.memoizedProps=e.pendingProps,null===t?kc(e):Ls=t,ks.current=null}function kc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ss(n,t,Ns)))return void(Ls=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&Ns)||0==(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=cs(t)))return n.flags&=2047,void(Ls=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Ls=t);Ls=t=e}while(null!==t);0===Us&&(Us=5)}function Rc(e){var t=zo();return qo(99,Mc.bind(null,e,t)),null}function Mc(e,t){do{xc()}while(null!==ec);if(0!=(48&Rs))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,c=e.expirationTimes;0<i;){var l=31-Kt(i),u=1<<l;o[l]=0,s[l]=-1,c[l]=-1,i&=~u}if(null!==oc&&0==(24&r)&&oc.has(e)&&oc.delete(e),e===Ms&&(Ls=Ms=null,xs=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Rs,Rs|=32,ks.current=null,Vr=$t,vr(s=mr())){if("selectionStart"in s)c={start:s.selectionStart,end:s.selectionEnd};else e:if(c=(c=s.ownerDocument)&&c.defaultView||window,(u=c.getSelection&&c.getSelection())&&0!==u.rangeCount){c=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{c.nodeType,l.nodeType}catch(e){c=null;break e}var d=0,_=-1,p=-1,h=0,f=0,m=s,v=null;t:for(;;){for(var g;m!==c||0!==i&&3!==m.nodeType||(_=d+i),m!==l||0!==u&&3!==m.nodeType||(p=d+u),3===m.nodeType&&(d+=m.nodeValue.length),null!==(g=m.firstChild);)v=m,m=g;for(;;){if(m===s)break t;if(v===c&&++h===i&&(_=d),v===l&&++f===u&&(p=d),null!==(g=m.nextSibling))break;v=(m=v).parentNode}m=g}c=-1===_||-1===p?null:{start:_,end:p}}else c=null;c=c||{start:0,end:0}}else c=null;Hr={focusedElem:s,selectionRange:c},$t=!1,uc=null,dc=!1,$s=r;do{try{Lc()}catch(e){if(null===$s)throw Error(a(330));Wc($s,e),$s=$s.nextEffect}}while(null!==$s);uc=null,$s=r;do{try{for(s=e;null!==$s;){var y=$s.flags;if(16&y&&ge($s.stateNode,""),128&y){var E=$s.alternate;if(null!==E){var w=E.ref;null!==w&&("function"==typeof w?w(null):w.current=null)}}switch(1038&y){case 2:bs($s),$s.flags&=-3;break;case 6:bs($s),$s.flags&=-3,As($s.alternate,$s);break;case 1024:$s.flags&=-1025;break;case 1028:$s.flags&=-1025,As($s.alternate,$s);break;case 4:As($s.alternate,$s);break;case 8:Ts(s,c=$s);var b=c.alternate;Es(c),null!==b&&Es(b)}$s=$s.nextEffect}}catch(e){if(null===$s)throw Error(a(330));Wc($s,e),$s=$s.nextEffect}}while(null!==$s);if(w=Hr,E=mr(),y=w.focusedElem,s=w.selectionRange,E!==y&&y&&y.ownerDocument&&fr(y.ownerDocument.documentElement,y)){null!==s&&vr(y)&&(E=s.start,void 0===(w=s.end)&&(w=E),"selectionStart"in y?(y.selectionStart=E,y.selectionEnd=Math.min(w,y.value.length)):(w=(E=y.ownerDocument||document)&&E.defaultView||window).getSelection&&(w=w.getSelection(),c=y.textContent.length,b=Math.min(s.start,c),s=void 0===s.end?b:Math.min(s.end,c),!w.extend&&b>s&&(c=s,s=b,b=c),c=hr(y,b),i=hr(y,s),c&&i&&(1!==w.rangeCount||w.anchorNode!==c.node||w.anchorOffset!==c.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&((E=E.createRange()).setStart(c.node,c.offset),w.removeAllRanges(),b>s?(w.addRange(E),w.extend(i.node,i.offset)):(E.setEnd(i.node,i.offset),w.addRange(E))))),E=[];for(w=y;w=w.parentNode;)1===w.nodeType&&E.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"==typeof y.focus&&y.focus(),y=0;y<E.length;y++)(w=E[y]).element.scrollLeft=w.left,w.element.scrollTop=w.top}$t=!!Vr,Hr=Vr=null,e.current=n,$s=r;do{try{for(y=e;null!==$s;){var C=$s.flags;if(36&C&&vs(y,$s.alternate,$s),128&C){E=void 0;var S=$s.ref;if(null!==S){var T=$s.stateNode;$s.tag,E=T,"function"==typeof S?S(E):S.current=E}}$s=$s.nextEffect}}catch(e){if(null===$s)throw Error(a(330));Wc($s,e),$s=$s.nextEffect}}while(null!==$s);$s=null,Fo(),Rs=o}else e.current=n;if(Zs)Zs=!1,ec=e,tc=t;else for($s=r;null!==$s;)t=$s.nextEffect,$s.nextEffect=null,8&$s.flags&&((C=$s).sibling=null,C.stateNode=null),$s=t;if(0===(r=e.pendingLanes)&&(Js=null),1===r?e===ac?ic++:(ic=0,ac=e):ic=0,n=n.stateNode,To&&"function"==typeof To.onCommitFiberRoot)try{To.onCommitFiberRoot(So,n,void 0,64==(64&n.current.flags))}catch(e){}if(mc(e,Ko()),Xs)throw Xs=!1,e=Qs,Qs=null,e;return 0!=(8&Rs)||$o(),null}function Lc(){for(;null!==$s;){var e=$s.alternate;dc||null===uc||(0!=(8&$s.flags)?et($s,uc)&&(dc=!0):13===$s.tag&&Ps(e,$s)&&et($s,uc)&&(dc=!0));var t=$s.flags;0!=(256&t)&&ms(e,$s),0==(512&t)||Zs||(Zs=!0,Yo(97,(function(){return xc(),null}))),$s=$s.nextEffect}}function xc(){if(90!==tc){var e=97<tc?97:tc;return tc=90,qo(e,Uc)}return!1}function Nc(e,t){nc.push(t,e),Zs||(Zs=!0,Yo(97,(function(){return xc(),null})))}function Bc(e,t){rc.push(t,e),Zs||(Zs=!0,Yo(97,(function(){return xc(),null})))}function Uc(){if(null===ec)return!1;var e=ec;if(ec=null,0!=(48&Rs))throw Error(a(331));var t=Rs;Rs|=32;var n=rc;rc=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,"function"==typeof s)try{s()}catch(e){if(null===i)throw Error(a(330));Wc(i,e)}}for(n=nc,nc=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var c=o.create;o.destroy=c()}catch(e){if(null===i)throw Error(a(330));Wc(i,e)}}for(c=e.current.firstEffect;null!==c;)e=c.nextEffect,c.nextEffect=null,8&c.flags&&(c.sibling=null,c.stateNode=null),c=e;return Rs=t,$o(),!0}function Fc(e,t,n){_i(e,t=_s(0,t=ls(n,t),1)),t=_c(),null!==(e=fc(e,1))&&(jt(e,1,t),mc(e,t))}function Wc(e,t){if(3===e.tag)Fc(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Fc(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Js||!Js.has(r))){var o=ps(n,e=ls(t,e),1);if(_i(n,o),o=_c(),null!==(n=fc(n,1)))jt(n,1,o),mc(n,o);else if("function"==typeof r.componentDidCatch&&(null===Js||!Js.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Vc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=_c(),e.pingedLanes|=e.suspendedLanes&n,Ms===e&&(xs&n)===n&&(4===Us||3===Us&&(62914560&xs)===xs&&500>Ko()-zs?Sc(e,0):js|=n),mc(e,t)}function Hc(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===zo()?1:2:(0===cc&&(cc=Ws),0===(t=Vt(62914560&~cc))&&(t=4194304))),n=_c(),null!==(e=fc(e,t))&&(jt(e,t,n),mc(e,n))}function jc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Kc(e,t,n,r){return new jc(e,t,n,r)}function zc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Gc(e,t){var n=e.alternate;return null===n?((n=Kc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function qc(e,t,n,r,o,i){var s=2;if(r=e,"function"==typeof e)zc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case S:return Yc(n.children,o,i,t);case N:s=8,o|=16;break;case T:s=8,o|=1;break;case A:return(e=Kc(12,n,t,8|o)).elementType=A,e.type=A,e.lanes=i,e;case I:return(e=Kc(13,n,t,o)).type=I,e.elementType=I,e.lanes=i,e;case k:return(e=Kc(19,n,t,o)).elementType=k,e.lanes=i,e;case B:return $c(n,o,i,t);case U:return(e=Kc(24,n,t,o)).elementType=U,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case D:s=10;break e;case P:s=9;break e;case O:s=11;break e;case R:s=14;break e;case M:s=16,r=null;break e;case L:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Kc(s,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Yc(e,t,n,r){return(e=Kc(7,e,r,t)).lanes=n,e}function $c(e,t,n,r){return(e=Kc(23,e,r,t)).elementType=B,e.lanes=n,e}function Xc(e,t,n){return(e=Kc(6,e,null,t)).lanes=n,e}function Qc(e,t,n){return(t=Kc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Jc(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ht(0),this.expirationTimes=Ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ht(0),this.mutableSourceEagerHydrationData=null}function Zc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:C,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function el(e,t,n,r){var o=t.current,i=_c(),s=pc(o);e:if(n){t:{if(Xe(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var c=n;do{switch(c.tag){case 3:c=c.stateNode.context;break t;case 1:if(go(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break t}}c=c.return}while(null!==c);throw Error(a(171))}if(1===n.tag){var l=n.type;if(go(l)){n=wo(n,l,c);break e}}n=c}else n=po;return null===t.context?t.context=n:t.pendingContext=n,(t=di(i,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),_i(o,t),hc(o,s,i),s}function tl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function nl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function rl(e,t){nl(e,t),(e=e.alternate)&&nl(e,t)}function ol(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Jc(e,t,null!=n&&!0===n.hydrate),t=Kc(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,li(t),e[eo]=n.current,Rr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function il(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function al(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var s=o;o=function(){var e=tl(a);s.call(e)}}el(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ol(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var c=o;o=function(){var e=tl(a);c.call(e)}}wc((function(){el(t,a,e,o)}))}return tl(a)}function sl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!il(t))throw Error(a(200));return Zc(e,t,null,n)}Ys=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||fo.current)Ba=!0;else{if(0==(n&r)){switch(Ba=!1,t.tag){case 3:qa(t),Yi();break;case 5:Ni(t);break;case 1:go(t.type)&&bo(t);break;case 4:Li(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;_o(Zo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?Ja(e,t,n):(_o(Ui,1&Ui.current),null!==(t=is(e,t,n))?t.sibling:null);_o(Ui,1&Ui.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return os(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),_o(Ui,Ui.current),r)break;return null;case 23:case 24:return t.lanes=0,Ha(e,t,n)}return is(e,t,n)}Ba=0!=(16384&e.flags)}else Ba=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=vo(t,ho.current),ai(t,n),o=sa(null,t,r,e,o,n),t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,go(r)){var i=!0;bo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,li(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&vi(t,r,s,e),o.updater=gi,t.stateNode=o,o._reactInternals=t,bi(t,r,e,n),t=Ga(null,t,r,!0,i,n)}else t.tag=0,Ua(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"==typeof e)return zc(e)?1:0;if(null!=e){if((e=e.$$typeof)===O)return 11;if(e===R)return 14}return 2}(o),e=Jo(o,e),i){case 0:t=Ka(null,t,o,e,n);break e;case 1:t=za(null,t,o,e,n);break e;case 11:t=Fa(null,t,o,e,n);break e;case 14:t=Wa(null,t,o,Jo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ka(e,t,r,o=t.elementType===r?o:Jo(r,o),n);case 1:return r=t.type,o=t.pendingProps,za(e,t,r,o=t.elementType===r?o:Jo(r,o),n);case 3:if(qa(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,ui(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Yi(),t=is(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Vi=Yr(t.stateNode.containerInfo.firstChild),Wi=t,i=Hi=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],$i.push(i);for(n=Pi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Ua(e,t,r,n),Yi();t=t.child}return t;case 5:return Ni(t),null===e&&zi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,s=o.children,Kr(r,o)?s=null:null!==i&&Kr(r,i)&&(t.flags|=16),ja(e,t),Ua(e,t,s,n),t.child;case 6:return null===e&&zi(t),null;case 13:return Ja(e,t,n);case 4:return Li(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Di(t,null,r,n):Ua(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Fa(e,t,r,o=t.elementType===r?o:Jo(r,o),n);case 7:return Ua(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ua(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var c=t.type._context;if(_o(Zo,c._currentValue),c._currentValue=i,null!==s)if(c=s.value,0===(i=ur(c,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(c,i):1073741823))){if(s.children===o.children&&!fo.current){t=is(e,t,n);break e}}else for(null!==(c=t.child)&&(c.return=t);null!==c;){var l=c.dependencies;if(null!==l){s=c.child;for(var u=l.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&i)){1===c.tag&&((u=di(-1,n&-n)).tag=2,_i(c,u)),c.lanes|=n,null!==(u=c.alternate)&&(u.lanes|=n),ii(c.return,n),l.lanes|=n;break}u=u.next}}else s=10===c.tag&&c.type===t.type?null:c.child;if(null!==s)s.return=c;else for(s=c;null!==s;){if(s===t){s=null;break}if(null!==(c=s.sibling)){c.return=s.return,s=c;break}s=s.return}c=s}Ua(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ai(t,n),r=r(o=si(o,i.unstable_observedBits)),t.flags|=1,Ua(e,t,r,n),t.child;case 14:return i=Jo(o=t.type,t.pendingProps),Wa(e,t,o,i=Jo(o.type,i),r,n);case 15:return Va(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,go(r)?(e=!0,bo(t)):e=!1,ai(t,n),Ei(t,r,o),bi(t,r,o,n),Ga(null,t,r,!0,e,n);case 19:return os(e,t,n);case 23:case 24:return Ha(e,t,n)}throw Error(a(156,t.tag))},ol.prototype.render=function(e){el(e,this._internalRoot,null,null)},ol.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;el(null,e,null,(function(){t[eo]=null}))},tt=function(e){13===e.tag&&(hc(e,4,_c()),rl(e,4))},nt=function(e){13===e.tag&&(hc(e,67108864,_c()),rl(e,67108864))},rt=function(e){if(13===e.tag){var t=_c(),n=pc(e);hc(e,n,t),rl(e,n)}},ot=function(e,t){return t()},De=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=io(r);if(!o)throw Error(a(90));Q(r),ne(r,o)}}}break;case"textarea":le(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Me=Ec,Le=function(e,t,n,r,o){var i=Rs;Rs|=4;try{return qo(98,e.bind(null,t,n,r,o))}finally{0===(Rs=i)&&(qs(),$o())}},xe=function(){0==(49&Rs)&&(function(){if(null!==oc){var e=oc;oc=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,mc(e,Ko())}))}$o()}(),xc())},Ne=function(e,t){var n=Rs;Rs|=2;try{return e(t)}finally{0===(Rs=n)&&(qs(),$o())}};var cl={Events:[ro,oo,io,ke,Re,xc,{current:!1}]},ll={findFiberByHostInstance:no,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},ul={bundleType:ll.bundleType,version:ll.version,rendererPackageName:ll.rendererPackageName,rendererConfig:ll.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:ll.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var dl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dl.isDisabled&&dl.supportsFiber)try{So=dl.inject(ul),To=dl}catch(me){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cl,t.createPortal=sl,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Rs;if(0!=(48&n))return e(t);Rs|=1;try{if(e)return qo(99,e.bind(null,t))}finally{Rs=n,$o()}},t.hydrate=function(e,t,n){if(!il(t))throw Error(a(200));return al(null,e,t,!0,n)},t.render=function(e,t,n){if(!il(t))throw Error(a(200));return al(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!il(e))throw Error(a(40));return!!e._reactRootContainer&&(wc((function(){al(null,null,e,!1,(function(){e._reactRootContainer=null,e[eo]=null}))})),!0)},t.unstable_batchedUpdates=Ec,t.unstable_createPortal=function(e,t){return sl(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!il(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return al(e,t,n,!1,r)},t.version="17.0.2"},973935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(364448)},925013:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,c=o(e),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))n.call(a,u)&&(c[u]=a[u]);if(t){s=t(a);for(var d=0;d<s.length;d++)r.call(a,s[d])&&(c[s[d]]=a[s[d]])}}return c}},469590:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer;function i(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var s,c,l,u;if(Array.isArray(e)){if((s=e.length)!=a.length)return!1;for(c=s;0!=c--;)if(!i(e[c],a[c]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!a.has(c.value[0]))return!1;for(u=e.entries();!(c=u.next()).done;)if(!i(c.value[1],a.get(c.value[0])))return!1;return!0}if(r&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(u=e.entries();!(c=u.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((s=e.length)!=a.length)return!1;for(c=s;0!=c--;)if(e[c]!==a[c])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===a.toString();if((s=(l=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(c=s;0!=c--;)if(!Object.prototype.hasOwnProperty.call(a,l[c]))return!1;if(t&&e instanceof Element)return!1;for(c=s;0!=c--;)if(!("_owner"===l[c]&&e.$$typeof||i(e[l[c]],a[l[c]])))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return i(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},140867:(e,t,n)=>{"use strict";n.d(t,{usePopper:()=>l});var r=n(667294),o=n(220804),i=n(469590),a=n.n(i),s=n(67139),c=[],l=function(e,t,n){void 0===n&&(n={});var i=r.useRef(null),l={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||c},u=r.useState({styles:{popper:{position:l.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),d=u[0],_=u[1],p=r.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(e){var t=e.state,n=Object.keys(t.elements);_({styles:(0,s.fromEntries)(n.map((function(e){return[e,t.styles[e]||{}]}))),attributes:(0,s.fromEntries)(n.map((function(e){return[e,t.attributes[e]]})))})},requires:["computeStyles"]}}),[]),h=r.useMemo((function(){var e={onFirstUpdate:l.onFirstUpdate,placement:l.placement,strategy:l.strategy,modifiers:[].concat(l.modifiers,[p,{name:"applyStyles",enabled:!1}])};return a()(i.current,e)?i.current||e:(i.current=e,e)}),[l.onFirstUpdate,l.placement,l.strategy,l.modifiers,p]),f=r.useRef();return(0,s.useIsomorphicLayoutEffect)((function(){f.current&&f.current.setOptions(h)}),[h]),(0,s.useIsomorphicLayoutEffect)((function(){if(null!=e&&null!=t){var r=(n.createPopper||o.createPopper)(e,t,h);return f.current=r,function(){r.destroy(),f.current=null}}}),[e,t,n.createPopper]),{state:f.current?f.current.state:null,styles:d.styles,attributes:d.attributes,update:f.current?f.current.update:null,forceUpdate:f.current?f.current.forceUpdate:null}}},67139:(e,t,n)=>{"use strict";n.d(t,{fromEntries:()=>o,useIsomorphicLayoutEffect:()=>i});var r=n(667294),o=function(e){return e.reduce((function(e,t){var n=t[0],r=t[1];return e[n]=r,e}),{})},i="undefined"!=typeof window&&window.document&&window.document.createElement?r.useLayoutEffect:r.useEffect},872408:(e,t,n)=>{"use strict";var r=n(409424),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,c=60112;t.Suspense=60113;var l=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;o=d("react.element"),i=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),c=d("react.forward_ref"),t.Suspense=d("react.suspense"),l=d("react.memo"),u=d("react.lazy")}var _="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f={};function m(e,t,n){this.props=e,this.context=t,this.refs=f,this.updater=n||h}function v(){}function g(e,t,n){this.props=e,this.context=t,this.refs=f,this.updater=n||h}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=m.prototype;var y=g.prototype=new v;y.constructor=g,r(y,m.prototype),y.isPureReactComponent=!0;var E={current:null},w=Object.prototype.hasOwnProperty,b={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,r)&&!b.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in c=e.defaultProps)void 0===i[r]&&(i[r]=c[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:E.current}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var T=/\/+/g;function A(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function D(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var c=!1;if(null===e)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case o:case i:c=!0}}if(c)return a=a(c=e),e=""===r?"."+A(c,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(T,"$&/")+"/"),D(a,t,n,"",(function(e){return e}))):null!=a&&(S(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(T,"$&/")+"/")+e)),t.push(a)),1;if(c=0,r=""===r?".":r+":",Array.isArray(e))for(var l=0;l<e.length;l++){var u=r+A(s=e[l],l);c+=D(s,t,n,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=_&&e[_]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),l=0;!(s=e.next()).done;)c+=D(s=s.value,t,n,u=r+A(s,l++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return c}function P(e,t,n){if(null==e)return e;var r=[],o=0;return D(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function O(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var I={current:null};function k(){var e=I.current;if(null===e)throw Error(p(321));return e}var R={ReactCurrentDispatcher:I,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:E,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!S(e))throw Error(p(143));return e}},t.Component=m,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,c=E.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)w.call(t,u)&&!b.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){l=Array(u);for(var d=0;d<u;d++)l[d]=arguments[d+2];i.children=l}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:c}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:O}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return k().useCallback(e,t)},t.useContext=function(e,t){return k().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return k().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return k().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return k().useLayoutEffect(e,t)},t.useMemo=function(e,t){return k().useMemo(e,t)},t.useReducer=function(e,t,n){return k().useReducer(e,t,n)},t.useRef=function(e){return k().useRef(e)},t.useState=function(e){return k().useState(e)},t.version="17.0.2"},667294:(e,t,n)=>{"use strict";e.exports=n(872408)},409424:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,c=o(e),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))n.call(a,u)&&(c[u]=a[u]);if(t){s=t(a);for(var d=0;d<s.length;d++)r.call(a,s[d])&&(c[s[d]]=a[s[d]])}}return c}},286702:()=>{window.requestIdleCallback=window.requestIdleCallback||function(e){var t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)}},762539:(e,t,n)=>{"use strict";var r=n(857539);function o(e,t,n,o,i){var a=r.writeRtpDescription(e.kind,t);if(a+=r.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=r.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":i||"active"),a+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var s=e.rtpSender._initialTrackId||e.rtpSender.track.id;e.rtpSender._initialTrackId=s;var c="msid:"+(o?o.id:"-")+" "+s+"\r\n";a+="a="+c,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+c,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+c,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+r.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+r.localCName+"\r\n"),a}function i(e,t){var n={codecs:[],headerExtensions:[],fecMechanisms:[]},r=function(e,t){e=parseInt(e,10);for(var n=0;n<t.length;n++)if(t[n].payloadType===e||t[n].preferredPayloadType===e)return t[n]},o=function(e,t,n,o){var i=r(e.parameters.apt,n),a=r(t.parameters.apt,o);return i&&a&&i.name.toLowerCase()===a.name.toLowerCase()};return e.codecs.forEach((function(r){for(var i=0;i<t.codecs.length;i++){var a=t.codecs[i];if(r.name.toLowerCase()===a.name.toLowerCase()&&r.clockRate===a.clockRate){if("rtx"===r.name.toLowerCase()&&r.parameters&&a.parameters.apt&&!o(r,a,e.codecs,t.codecs))continue;(a=JSON.parse(JSON.stringify(a))).numChannels=Math.min(r.numChannels,a.numChannels),n.codecs.push(a),a.rtcpFeedback=a.rtcpFeedback.filter((function(e){for(var t=0;t<r.rtcpFeedback.length;t++)if(r.rtcpFeedback[t].type===e.type&&r.rtcpFeedback[t].parameter===e.parameter)return!0;return!1}));break}}})),e.headerExtensions.forEach((function(e){for(var r=0;r<t.headerExtensions.length;r++){var o=t.headerExtensions[r];if(e.uri===o.uri){n.headerExtensions.push(o);break}}})),n}function a(e,t,n){return-1!=={offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[t][e].indexOf(n)}function s(e,t){var n=e.getRemoteCandidates().find((function(e){return t.foundation===e.foundation&&t.ip===e.ip&&t.port===e.port&&t.priority===e.priority&&t.protocol===e.protocol&&t.type===e.type}));return n||e.addRemoteCandidate(t),!n}function c(e,t){var n=new Error(t);return n.name=e,n.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[e],n}e.exports=function(e,t){function n(t,n){n.addTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("addtrack",{track:t}))}function l(t,n,r,o){var i=new Event("track");i.track=n,i.receiver=r,i.transceiver={receiver:r},i.streams=o,e.setTimeout((function(){t._dispatchEvent("track",i)}))}var u=function(n){var o=this,i=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach((function(e){o[e]=i[e].bind(i)})),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this._localDescription=null,this._remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.connectionState="new",this.iceGatheringState="new",n=JSON.parse(JSON.stringify(n||{})),this.usingBundle="max-bundle"===n.bundlePolicy,"negotiate"===n.rtcpMuxPolicy)throw c("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(n.rtcpMuxPolicy||(n.rtcpMuxPolicy="require"),n.iceTransportPolicy){case"all":case"relay":break;default:n.iceTransportPolicy="all"}switch(n.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:n.bundlePolicy="balanced"}if(n.iceServers=function(e,t){var n=!1;return(e=JSON.parse(JSON.stringify(e))).filter((function(e){if(e&&(e.urls||e.url)){var r=e.urls||e.url;e.url&&!e.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var o="string"==typeof r;return o&&(r=[r]),r=r.filter((function(e){return 0!==e.indexOf("turn:")||-1===e.indexOf("transport=udp")||-1!==e.indexOf("turn:[")||n?0===e.indexOf("stun:")&&t>=14393&&-1===e.indexOf("?transport=udp"):(n=!0,!0)})),delete e.url,e.urls=o?r[0]:r,!!r.length}}))}(n.iceServers||[],t),this._iceGatherers=[],n.iceCandidatePoolSize)for(var a=n.iceCandidatePoolSize;a>0;a--)this._iceGatherers.push(new e.RTCIceGatherer({iceServers:n.iceServers,gatherPolicy:n.iceTransportPolicy}));else n.iceCandidatePoolSize=0;this._config=n,this.transceivers=[],this._sdpSessionId=r.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(u.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(u.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),u.prototype.onicecandidate=null,u.prototype.onaddstream=null,u.prototype.ontrack=null,u.prototype.onremovestream=null,u.prototype.onsignalingstatechange=null,u.prototype.oniceconnectionstatechange=null,u.prototype.onconnectionstatechange=null,u.prototype.onicegatheringstatechange=null,u.prototype.onnegotiationneeded=null,u.prototype.ondatachannel=null,u.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},u.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},u.prototype.getConfiguration=function(){return this._config},u.prototype.getLocalStreams=function(){return this.localStreams},u.prototype.getRemoteStreams=function(){return this.remoteStreams},u.prototype._createTransceiver=function(e,t){var n=this.transceivers.length>0,r={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&n)r.iceTransport=this.transceivers[0].iceTransport,r.dtlsTransport=this.transceivers[0].dtlsTransport;else{var o=this._createIceAndDtlsTransports();r.iceTransport=o.iceTransport,r.dtlsTransport=o.dtlsTransport}return t||this.transceivers.push(r),r},u.prototype.addTrack=function(t,n){if(this._isClosed)throw c("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var r;if(this.transceivers.find((function(e){return e.track===t})))throw c("InvalidAccessError","Track already exists.");for(var o=0;o<this.transceivers.length;o++)this.transceivers[o].track||this.transceivers[o].kind!==t.kind||(r=this.transceivers[o]);return r||(r=this._createTransceiver(t.kind)),this._maybeFireNegotiationNeeded(),-1===this.localStreams.indexOf(n)&&this.localStreams.push(n),r.track=t,r.stream=n,r.rtpSender=new e.RTCRtpSender(t,r.dtlsTransport),r.rtpSender},u.prototype.addStream=function(e){var n=this;if(t>=15025)e.getTracks().forEach((function(t){n.addTrack(t,e)}));else{var r=e.clone();e.getTracks().forEach((function(e,t){var n=r.getTracks()[t];e.addEventListener("enabled",(function(e){n.enabled=e.enabled}))})),r.getTracks().forEach((function(e){n.addTrack(e,r)}))}},u.prototype.removeTrack=function(t){if(this._isClosed)throw c("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof e.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var n=this.transceivers.find((function(e){return e.rtpSender===t}));if(!n)throw c("InvalidAccessError","Sender was not created by this connection.");var r=n.stream;n.rtpSender.stop(),n.rtpSender=null,n.track=null,n.stream=null,-1===this.transceivers.map((function(e){return e.stream})).indexOf(r)&&this.localStreams.indexOf(r)>-1&&this.localStreams.splice(this.localStreams.indexOf(r),1),this._maybeFireNegotiationNeeded()},u.prototype.removeStream=function(e){var t=this;e.getTracks().forEach((function(e){var n=t.getSenders().find((function(t){return t.track===e}));n&&t.removeTrack(n)}))},u.prototype.getSenders=function(){return this.transceivers.filter((function(e){return!!e.rtpSender})).map((function(e){return e.rtpSender}))},u.prototype.getReceivers=function(){return this.transceivers.filter((function(e){return!!e.rtpReceiver})).map((function(e){return e.rtpReceiver}))},u.prototype._createIceGatherer=function(t,n){var r=this;if(n&&t>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var o=new e.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(o,"state",{value:"new",writable:!0}),this.transceivers[t].bufferedCandidateEvents=[],this.transceivers[t].bufferCandidates=function(e){var n=!e.candidate||0===Object.keys(e.candidate).length;o.state=n?"completed":"gathering",null!==r.transceivers[t].bufferedCandidateEvents&&r.transceivers[t].bufferedCandidateEvents.push(e)},o.addEventListener("localcandidate",this.transceivers[t].bufferCandidates),o},u.prototype._gather=function(t,n){var o=this,i=this.transceivers[n].iceGatherer;if(!i.onlocalcandidate){var a=this.transceivers[n].bufferedCandidateEvents;this.transceivers[n].bufferedCandidateEvents=null,i.removeEventListener("localcandidate",this.transceivers[n].bufferCandidates),i.onlocalcandidate=function(e){if(!(o.usingBundle&&n>0)){var a=new Event("icecandidate");a.candidate={sdpMid:t,sdpMLineIndex:n};var s=e.candidate,c=!s||0===Object.keys(s).length;if(c)"new"!==i.state&&"gathering"!==i.state||(i.state="completed");else{"new"===i.state&&(i.state="gathering"),s.component=1,s.ufrag=i.getLocalParameters().usernameFragment;var l=r.writeCandidate(s);a.candidate=Object.assign(a.candidate,r.parseCandidate(l)),a.candidate.candidate=l,a.candidate.toJSON=function(){return{candidate:a.candidate.candidate,sdpMid:a.candidate.sdpMid,sdpMLineIndex:a.candidate.sdpMLineIndex,usernameFragment:a.candidate.usernameFragment}}}var u=r.getMediaSections(o._localDescription.sdp);u[a.candidate.sdpMLineIndex]+=c?"a=end-of-candidates\r\n":"a="+a.candidate.candidate+"\r\n",o._localDescription.sdp=r.getDescription(o._localDescription.sdp)+u.join("");var d=o.transceivers.every((function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state}));"gathering"!==o.iceGatheringState&&(o.iceGatheringState="gathering",o._emitGatheringStateChange()),c||o._dispatchEvent("icecandidate",a),d&&(o._dispatchEvent("icecandidate",new Event("icecandidate")),o.iceGatheringState="complete",o._emitGatheringStateChange())}},e.setTimeout((function(){a.forEach((function(e){i.onlocalcandidate(e)}))}),0)}},u.prototype._createIceAndDtlsTransports=function(){var t=this,n=new e.RTCIceTransport(null);n.onicestatechange=function(){t._updateIceConnectionState(),t._updateConnectionState()};var r=new e.RTCDtlsTransport(n);return r.ondtlsstatechange=function(){t._updateConnectionState()},r.onerror=function(){Object.defineProperty(r,"state",{value:"failed",writable:!0}),t._updateConnectionState()},{iceTransport:n,dtlsTransport:r}},u.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var n=this.transceivers[e].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[e].iceTransport);var r=this.transceivers[e].dtlsTransport;r&&(delete r.ondtlsstatechange,delete r.onerror,delete this.transceivers[e].dtlsTransport)},u.prototype._transceive=function(e,n,o){var a=i(e.localCapabilities,e.remoteCapabilities);n&&e.rtpSender&&(a.encodings=e.sendEncodingParameters,a.rtcp={cname:r.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(a.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(a)),o&&e.rtpReceiver&&a.codecs.length>0&&("video"===e.kind&&e.recvEncodingParameters&&t<15019&&e.recvEncodingParameters.forEach((function(e){delete e.rtx})),e.recvEncodingParameters.length?a.encodings=e.recvEncodingParameters:a.encodings=[{}],a.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(a.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(a.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(a))},u.prototype.setLocalDescription=function(e){var t,n,o=this;if(-1===["offer","answer"].indexOf(e.type))return Promise.reject(c("TypeError",'Unsupported type "'+e.type+'"'));if(!a("setLocalDescription",e.type,o.signalingState)||o._isClosed)return Promise.reject(c("InvalidStateError","Can not set local "+e.type+" in state "+o.signalingState));if("offer"===e.type)t=r.splitSections(e.sdp),n=t.shift(),t.forEach((function(e,t){var n=r.parseRtpParameters(e);o.transceivers[t].localCapabilities=n})),o.transceivers.forEach((function(e,t){o._gather(e.mid,t)}));else if("answer"===e.type){t=r.splitSections(o._remoteDescription.sdp),n=t.shift();var s=r.matchPrefix(n,"a=ice-lite").length>0;t.forEach((function(e,t){var a=o.transceivers[t],c=a.iceGatherer,l=a.iceTransport,u=a.dtlsTransport,d=a.localCapabilities,_=a.remoteCapabilities;if(!(r.isRejected(e)&&0===r.matchPrefix(e,"a=bundle-only").length)&&!a.rejected){var p=r.getIceParameters(e,n),h=r.getDtlsParameters(e,n);s&&(h.role="server"),o.usingBundle&&0!==t||(o._gather(a.mid,t),"new"===l.state&&l.start(c,p,s?"controlling":"controlled"),"new"===u.state&&u.start(h));var f=i(d,_);o._transceive(a,f.codecs.length>0,!1)}}))}return o._localDescription={type:e.type,sdp:e.sdp},"offer"===e.type?o._updateSignalingState("have-local-offer"):o._updateSignalingState("stable"),Promise.resolve()},u.prototype.setRemoteDescription=function(o){var u=this;if(-1===["offer","answer"].indexOf(o.type))return Promise.reject(c("TypeError",'Unsupported type "'+o.type+'"'));if(!a("setRemoteDescription",o.type,u.signalingState)||u._isClosed)return Promise.reject(c("InvalidStateError","Can not set remote "+o.type+" in state "+u.signalingState));var d={};u.remoteStreams.forEach((function(e){d[e.id]=e}));var _=[],p=r.splitSections(o.sdp),h=p.shift(),f=r.matchPrefix(h,"a=ice-lite").length>0,m=r.matchPrefix(h,"a=group:BUNDLE ").length>0;u.usingBundle=m;var v=r.matchPrefix(h,"a=ice-options:")[0];return u.canTrickleIceCandidates=!!v&&v.substr(14).split(" ").indexOf("trickle")>=0,p.forEach((function(a,c){var l=r.splitLines(a),p=r.getKind(a),v=r.isRejected(a)&&0===r.matchPrefix(a,"a=bundle-only").length,g=l[0].substr(2).split(" ")[2],y=r.getDirection(a,h),E=r.parseMsid(a),w=r.getMid(a)||r.generateIdentifier();if(v||"application"===p&&("DTLS/SCTP"===g||"UDP/DTLS/SCTP"===g))u.transceivers[c]={mid:w,kind:p,protocol:g,rejected:!0};else{var b,C,S,T,A,D,P,O,I;!v&&u.transceivers[c]&&u.transceivers[c].rejected&&(u.transceivers[c]=u._createTransceiver(p,!0));var k,R,M=r.parseRtpParameters(a);v||(k=r.getIceParameters(a,h),(R=r.getDtlsParameters(a,h)).role="client"),P=r.parseRtpEncodingParameters(a);var L=r.parseRtcpParameters(a),x=r.matchPrefix(a,"a=end-of-candidates",h).length>0,N=r.matchPrefix(a,"a=candidate:").map((function(e){return r.parseCandidate(e)})).filter((function(e){return 1===e.component}));if(("offer"===o.type||"answer"===o.type)&&!v&&m&&c>0&&u.transceivers[c]&&(u._disposeIceAndDtlsTransports(c),u.transceivers[c].iceGatherer=u.transceivers[0].iceGatherer,u.transceivers[c].iceTransport=u.transceivers[0].iceTransport,u.transceivers[c].dtlsTransport=u.transceivers[0].dtlsTransport,u.transceivers[c].rtpSender&&u.transceivers[c].rtpSender.setTransport(u.transceivers[0].dtlsTransport),u.transceivers[c].rtpReceiver&&u.transceivers[c].rtpReceiver.setTransport(u.transceivers[0].dtlsTransport)),"offer"!==o.type||v){if("answer"===o.type&&!v){C=(b=u.transceivers[c]).iceGatherer,S=b.iceTransport,T=b.dtlsTransport,A=b.rtpReceiver,D=b.sendEncodingParameters,O=b.localCapabilities,u.transceivers[c].recvEncodingParameters=P,u.transceivers[c].remoteCapabilities=M,u.transceivers[c].rtcpParameters=L,N.length&&"new"===S.state&&(!f&&!x||m&&0!==c?N.forEach((function(e){s(b.iceTransport,e)})):S.setRemoteCandidates(N)),m&&0!==c||("new"===S.state&&S.start(C,k,"controlling"),"new"===T.state&&T.start(R)),!i(b.localCapabilities,b.remoteCapabilities).codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&b.sendEncodingParameters[0].rtx&&delete b.sendEncodingParameters[0].rtx,u._transceive(b,"sendrecv"===y||"recvonly"===y,"sendrecv"===y||"sendonly"===y),!A||"sendrecv"!==y&&"sendonly"!==y?delete b.rtpReceiver:(I=A.track,E?(d[E.stream]||(d[E.stream]=new e.MediaStream),n(I,d[E.stream]),_.push([I,A,d[E.stream]])):(d.default||(d.default=new e.MediaStream),n(I,d.default),_.push([I,A,d.default])))}}else{(b=u.transceivers[c]||u._createTransceiver(p)).mid=w,b.iceGatherer||(b.iceGatherer=u._createIceGatherer(c,m)),N.length&&"new"===b.iceTransport.state&&(!x||m&&0!==c?N.forEach((function(e){s(b.iceTransport,e)})):b.iceTransport.setRemoteCandidates(N)),O=e.RTCRtpReceiver.getCapabilities(p),t<15019&&(O.codecs=O.codecs.filter((function(e){return"rtx"!==e.name}))),D=b.sendEncodingParameters||[{ssrc:1001*(2*c+2)}];var B,U=!1;if("sendrecv"===y||"sendonly"===y){if(U=!b.rtpReceiver,A=b.rtpReceiver||new e.RTCRtpReceiver(b.dtlsTransport,p),U)I=A.track,E&&"-"===E.stream||(E?(d[E.stream]||(d[E.stream]=new e.MediaStream,Object.defineProperty(d[E.stream],"id",{get:function(){return E.stream}})),Object.defineProperty(I,"id",{get:function(){return E.track}}),B=d[E.stream]):(d.default||(d.default=new e.MediaStream),B=d.default)),B&&(n(I,B),b.associatedRemoteMediaStreams.push(B)),_.push([I,A,B])}else b.rtpReceiver&&b.rtpReceiver.track&&(b.associatedRemoteMediaStreams.forEach((function(t){var n=t.getTracks().find((function(e){return e.id===b.rtpReceiver.track.id}));n&&function(t,n){n.removeTrack(t),n.dispatchEvent(new e.MediaStreamTrackEvent("removetrack",{track:t}))}(n,t)})),b.associatedRemoteMediaStreams=[]);b.localCapabilities=O,b.remoteCapabilities=M,b.rtpReceiver=A,b.rtcpParameters=L,b.sendEncodingParameters=D,b.recvEncodingParameters=P,u._transceive(u.transceivers[c],!1,U)}}})),void 0===u._dtlsRole&&(u._dtlsRole="offer"===o.type?"active":"passive"),u._remoteDescription={type:o.type,sdp:o.sdp},"offer"===o.type?u._updateSignalingState("have-remote-offer"):u._updateSignalingState("stable"),Object.keys(d).forEach((function(t){var n=d[t];if(n.getTracks().length){if(-1===u.remoteStreams.indexOf(n)){u.remoteStreams.push(n);var r=new Event("addstream");r.stream=n,e.setTimeout((function(){u._dispatchEvent("addstream",r)}))}_.forEach((function(e){var t=e[0],r=e[1];n.id===e[2].id&&l(u,t,r,[n])}))}})),_.forEach((function(e){e[2]||l(u,e[0],e[1],[])})),e.setTimeout((function(){u&&u.transceivers&&u.transceivers.forEach((function(e){e.iceTransport&&"new"===e.iceTransport.state&&e.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),e.iceTransport.addRemoteCandidate({}))}))}),4e3),Promise.resolve()},u.prototype.close=function(){this.transceivers.forEach((function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()})),this._isClosed=!0,this._updateSignalingState("closed")},u.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},u.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,e.setTimeout((function(){if(t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}}),0))},u.prototype._updateIceConnectionState=function(){var e,t={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(e){e.iceTransport&&!e.rejected&&t[e.iceTransport.state]++})),e="new",t.failed>0?e="failed":t.checking>0?e="checking":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0?e="connected":t.completed>0&&(e="completed"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}},u.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach((function(e){e.iceTransport&&e.dtlsTransport&&!e.rejected&&(t[e.iceTransport.state]++,t[e.dtlsTransport.state]++)})),t.connected+=t.completed,e="new",t.failed>0?e="failed":t.connecting>0?e="connecting":t.disconnected>0?e="disconnected":t.new>0?e="new":t.connected>0&&(e="connected"),e!==this.connectionState){this.connectionState=e;var n=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",n)}},u.prototype.createOffer=function(){var n=this;if(n._isClosed)return Promise.reject(c("InvalidStateError","Can not call createOffer after close"));var i=n.transceivers.filter((function(e){return"audio"===e.kind})).length,a=n.transceivers.filter((function(e){return"video"===e.kind})).length,s=arguments[0];if(s){if(s.mandatory||s.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==s.offerToReceiveAudio&&(i=!0===s.offerToReceiveAudio?1:!1===s.offerToReceiveAudio?0:s.offerToReceiveAudio),void 0!==s.offerToReceiveVideo&&(a=!0===s.offerToReceiveVideo?1:!1===s.offerToReceiveVideo?0:s.offerToReceiveVideo)}for(n.transceivers.forEach((function(e){"audio"===e.kind?--i<0&&(e.wantReceive=!1):"video"===e.kind&&--a<0&&(e.wantReceive=!1)}));i>0||a>0;)i>0&&(n._createTransceiver("audio"),i--),a>0&&(n._createTransceiver("video"),a--);var l=r.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.transceivers.forEach((function(o,i){var a=o.track,s=o.kind,c=o.mid||r.generateIdentifier();o.mid=c,o.iceGatherer||(o.iceGatherer=n._createIceGatherer(i,n.usingBundle));var l=e.RTCRtpSender.getCapabilities(s);t<15019&&(l.codecs=l.codecs.filter((function(e){return"rtx"!==e.name}))),l.codecs.forEach((function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1"),o.remoteCapabilities&&o.remoteCapabilities.codecs&&o.remoteCapabilities.codecs.forEach((function(t){e.name.toLowerCase()===t.name.toLowerCase()&&e.clockRate===t.clockRate&&(e.preferredPayloadType=t.payloadType)}))})),l.headerExtensions.forEach((function(e){(o.remoteCapabilities&&o.remoteCapabilities.headerExtensions||[]).forEach((function(t){e.uri===t.uri&&(e.id=t.id)}))}));var u=o.sendEncodingParameters||[{ssrc:1001*(2*i+1)}];a&&t>=15019&&"video"===s&&!u[0].rtx&&(u[0].rtx={ssrc:u[0].ssrc+1}),o.wantReceive&&(o.rtpReceiver=new e.RTCRtpReceiver(o.dtlsTransport,s)),o.localCapabilities=l,o.sendEncodingParameters=u})),"max-compat"!==n._config.bundlePolicy&&(l+="a=group:BUNDLE "+n.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),l+="a=ice-options:trickle\r\n",n.transceivers.forEach((function(e,t){l+=o(e,e.localCapabilities,"offer",e.stream,n._dtlsRole),l+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===n.iceGatheringState||0!==t&&n.usingBundle||(e.iceGatherer.getLocalCandidates().forEach((function(e){e.component=1,l+="a="+r.writeCandidate(e)+"\r\n"})),"completed"===e.iceGatherer.state&&(l+="a=end-of-candidates\r\n"))}));var u=new e.RTCSessionDescription({type:"offer",sdp:l});return Promise.resolve(u)},u.prototype.createAnswer=function(){var n=this;if(n._isClosed)return Promise.reject(c("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==n.signalingState&&"have-local-pranswer"!==n.signalingState)return Promise.reject(c("InvalidStateError","Can not call createAnswer in signalingState "+n.signalingState));var a=r.writeSessionBoilerplate(n._sdpSessionId,n._sdpSessionVersion++);n.usingBundle&&(a+="a=group:BUNDLE "+n.transceivers.map((function(e){return e.mid})).join(" ")+"\r\n"),a+="a=ice-options:trickle\r\n";var s=r.getMediaSections(n._remoteDescription.sdp).length;n.transceivers.forEach((function(e,r){if(!(r+1>s)){if(e.rejected)return"application"===e.kind?"DTLS/SCTP"===e.protocol?a+="m=application 0 DTLS/SCTP 5000\r\n":a+="m=application 0 "+e.protocol+" webrtc-datachannel\r\n":"audio"===e.kind?a+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===e.kind&&(a+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(a+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+e.mid+"\r\n");var c;if(e.stream)"audio"===e.kind?c=e.stream.getAudioTracks()[0]:"video"===e.kind&&(c=e.stream.getVideoTracks()[0]),c&&t>=15019&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1});var l=i(e.localCapabilities,e.remoteCapabilities);!l.codecs.filter((function(e){return"rtx"===e.name.toLowerCase()})).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,a+=o(e,l,"answer",e.stream,n._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(a+="a=rtcp-rsize\r\n")}}));var l=new e.RTCSessionDescription({type:"answer",sdp:a});return Promise.resolve(l)},u.prototype.addIceCandidate=function(e){var t,n=this;return e&&void 0===e.sdpMLineIndex&&!e.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise((function(o,i){if(!n._remoteDescription)return i(c("InvalidStateError","Can not add ICE candidate without a remote description"));if(e&&""!==e.candidate){var a=e.sdpMLineIndex;if(e.sdpMid)for(var l=0;l<n.transceivers.length;l++)if(n.transceivers[l].mid===e.sdpMid){a=l;break}var u=n.transceivers[a];if(!u)return i(c("OperationError","Can not add ICE candidate"));if(u.rejected)return o();var d=Object.keys(e.candidate).length>0?r.parseCandidate(e.candidate):{};if("tcp"===d.protocol&&(0===d.port||9===d.port))return o();if(d.component&&1!==d.component)return o();if((0===a||a>0&&u.iceTransport!==n.transceivers[0].iceTransport)&&!s(u.iceTransport,d))return i(c("OperationError","Can not add ICE candidate"));var _=e.candidate.trim();0===_.indexOf("a=")&&(_=_.substr(2)),(t=r.getMediaSections(n._remoteDescription.sdp))[a]+="a="+(d.type?_:"end-of-candidates")+"\r\n",n._remoteDescription.sdp=r.getDescription(n._remoteDescription.sdp)+t.join("")}else for(var p=0;p<n.transceivers.length&&(n.transceivers[p].rejected||(n.transceivers[p].iceTransport.addRemoteCandidate({}),(t=r.getMediaSections(n._remoteDescription.sdp))[p]+="a=end-of-candidates\r\n",n._remoteDescription.sdp=r.getDescription(n._remoteDescription.sdp)+t.join(""),!n.usingBundle));p++);o()}))},u.prototype.getStats=function(t){if(t&&t instanceof e.MediaStreamTrack){var n=null;if(this.transceivers.forEach((function(e){e.rtpSender&&e.rtpSender.track===t?n=e.rtpSender:e.rtpReceiver&&e.rtpReceiver.track===t&&(n=e.rtpReceiver)})),!n)throw c("InvalidAccessError","Invalid selector.");return n.getStats()}var r=[];return this.transceivers.forEach((function(e){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach((function(t){e[t]&&r.push(e[t].getStats())}))})),Promise.all(r).then((function(e){var t=new Map;return e.forEach((function(e){e.forEach((function(e){t.set(e.id,e)}))})),t}))};["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"].forEach((function(t){var n=e[t];if(n&&n.prototype&&n.prototype.getStats){var r=n.prototype.getStats;n.prototype.getStats=function(){return r.apply(this).then((function(e){var t=new Map;return Object.keys(e).forEach((function(n){var r;e[n].type={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[(r=e[n]).type]||r.type,t.set(n,e[n])})),t}))}}}));var d=["createOffer","createAnswer"];return d.forEach((function(e){var t=u.prototype[e];u.prototype[e]=function(){var e=arguments;return"function"==typeof e[0]||"function"==typeof e[1]?t.apply(this,[arguments[2]]).then((function(t){"function"==typeof e[0]&&e[0].apply(null,[t])}),(function(t){"function"==typeof e[1]&&e[1].apply(null,[t])})):t.apply(this,arguments)}})),(d=["setLocalDescription","setRemoteDescription","addIceCandidate"]).forEach((function(e){var t=u.prototype[e];u.prototype[e]=function(){var e=arguments;return"function"==typeof e[1]||"function"==typeof e[2]?t.apply(this,arguments).then((function(){"function"==typeof e[1]&&e[1].apply(null)}),(function(t){"function"==typeof e[2]&&e[2].apply(null,[t])})):t.apply(this,arguments)}})),["getStats"].forEach((function(e){var t=u.prototype[e];u.prototype[e]=function(){var e=arguments;return"function"==typeof e[1]?t.apply(this,arguments).then((function(){"function"==typeof e[1]&&e[1].apply(null)})):t.apply(this,arguments)}})),u}},560053:(e,t)=>{"use strict";var n,r,o,i;if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,u=null,d=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(d,0),e}};n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(d,0))},r=function(e,t){u=setTimeout(e,t)},o=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var _=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var h=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof h&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var f=!1,m=null,v=-1,g=5,y=0;t.unstable_shouldYield=function(){return t.unstable_now()>=y},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=0<e?Math.floor(1e3/e):5};var E=new MessageChannel,w=E.port2;E.port1.onmessage=function(){if(null!==m){var e=t.unstable_now();y=e+g;try{m(!0,e)?w.postMessage(null):(f=!1,m=null)}catch(e){throw w.postMessage(null),e}}else f=!1},n=function(e){m=e,f||(f=!0,w.postMessage(null))},r=function(e,n){v=_((function(){e(t.unstable_now())}),n)},o=function(){p(v),v=-1}}function b(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<T(o,t)))break e;e[r]=t,e[n]=o,n=r}}function C(e){return void 0===(e=e[0])?null:e}function S(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],s=i+1,c=e[s];if(void 0!==a&&0>T(a,n))void 0!==c&&0>T(c,a)?(e[r]=c,e[s]=n,r=s):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==c&&0>T(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var A=[],D=[],P=1,O=null,I=3,k=!1,R=!1,M=!1;function L(e){for(var t=C(D);null!==t;){if(null===t.callback)S(D);else{if(!(t.startTime<=e))break;S(D),t.sortIndex=t.expirationTime,b(A,t)}t=C(D)}}function x(e){if(M=!1,L(e),!R)if(null!==C(A))R=!0,n(N);else{var t=C(D);null!==t&&r(x,t.startTime-e)}}function N(e,n){R=!1,M&&(M=!1,o()),k=!0;var i=I;try{for(L(n),O=C(A);null!==O&&(!(O.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=O.callback;if("function"==typeof a){O.callback=null,I=O.priorityLevel;var s=a(O.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?O.callback=s:O===C(A)&&S(A),L(n)}else S(A);O=C(A)}if(null!==O)var c=!0;else{var l=C(D);null!==l&&r(x,l.startTime-n),c=!1}return c}finally{O=null,I=i,k=!1}}var B=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||k||(R=!0,n(N))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return C(A)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=B,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?s+a:s:a=s,e){case 1:var c=-1;break;case 2:c=250;break;case 5:c=1073741823;break;case 4:c=1e4;break;default:c=5e3}return e={id:P++,callback:i,priorityLevel:e,startTime:a,expirationTime:c=a+c,sortIndex:-1},a>s?(e.sortIndex=a,b(D,e),null===C(A)&&e===C(D)&&(M?o():M=!0,r(x,a-s))):(e.sortIndex=c,b(A,e),R||k||(R=!0,n(N))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},363840:(e,t,n)=>{"use strict";e.exports=n(560053)},857539:e=>{"use strict";var t={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map((function(e){return e.trim()}))},t.splitSections=function(e){return e.split("\nm=").map((function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"}))},t.getDescription=function(e){var n=t.splitSections(e);return n&&n[0]},t.getMediaSections=function(e){var n=t.splitSections(e);return n.shift(),n},t.matchPrefix=function(e,n){return t.splitLines(e).filter((function(e){return 0===e.indexOf(n)}))},t.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1],n.usernameFragment=t[r+1];break;default:n[t[r]]=t[r+1]}return n},t.writeCandidate=function(e){var t=[];t.push(e.foundation),t.push(e.component),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);var n=e.type;return t.push("typ"),t.push(n),"host"!==n&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substr(14).split(" ")},t.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},t.writeRtpMap=function(e){var t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);var n=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==n?"/"+n:"")+"\r\n"},t.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1]}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},t.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),o=0;o<r.length;o++)n[(t=r[o].trim().split("="))[0].trim()]=t[1];return n},t.writeFmtp=function(e){var t="",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){var r=[];Object.keys(e.parameters).forEach((function(t){e.parameters[t]?r.push(t+"="+e.parameters[t]):r.push(t)})),t+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){var t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"})),t},t.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},r=e.indexOf(":",t);return r>-1?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},t.parseSsrcGroup=function(e){var t=e.substr(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}},t.getMid=function(e){var n=t.matchPrefix(e,"a=mid:")[0];if(n)return n.substr(6)},t.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},t.getDtlsParameters=function(e,n){return{role:"auto",fingerprints:t.matchPrefix(e+n,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach((function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),n},t.parseCryptoLine=function(e){var t=e.substr(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;var t=e.substr(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,n){return t.matchPrefix(e+n,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,n){var r=t.matchPrefix(e+n,"a=ice-ufrag:")[0],o=t.matchPrefix(e+n,"a=ice-pwd:")[0];return r&&o?{usernameFragment:r.substr(12),password:o.substr(10)}:null},t.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},t.parseRtpParameters=function(e){for(var n={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=t.splitLines(e)[0].split(" "),o=3;o<r.length;o++){var i=r[o],a=t.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(a){var s=t.parseRtpMap(a),c=t.matchPrefix(e,"a=fmtp:"+i+" ");switch(s.parameters=c.length?t.parseFmtp(c[0]):{},s.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(t.parseRtcpFb),n.codecs.push(s),s.name.toUpperCase()){case"RED":case"ULPFEC":n.fecMechanisms.push(s.name.toUpperCase())}}}return t.matchPrefix(e,"a=extmap:").forEach((function(e){n.headerExtensions.push(t.parseExtmap(e))})),n},t.writeRtpDescription=function(e,n){var r="";r+="m="+e+" ",r+=n.codecs.length>0?"9":"0",r+=" UDP/TLS/RTP/SAVPF ",r+=n.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",n.codecs.forEach((function(e){r+=t.writeRtpMap(e),r+=t.writeFmtp(e),r+=t.writeRtcpFb(e)}));var o=0;return n.codecs.forEach((function(e){e.maxptime>o&&(o=e.maxptime)})),o>0&&(r+="a=maxptime:"+o+"\r\n"),r+="a=rtcp-mux\r\n",n.headerExtensions&&n.headerExtensions.forEach((function(e){r+=t.writeExtmap(e)})),r},t.parseRtpEncodingParameters=function(e){var n,r=[],o=t.parseRtpParameters(e),i=-1!==o.fecMechanisms.indexOf("RED"),a=-1!==o.fecMechanisms.indexOf("ULPFEC"),s=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute})),c=s.length>0&&s[0].ssrc,l=t.matchPrefix(e,"a=ssrc-group:FID").map((function(e){return e.substr(17).split(" ").map((function(e){return parseInt(e,10)}))}));l.length>0&&l[0].length>1&&l[0][0]===c&&(n=l[0][1]),o.codecs.forEach((function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var t={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10)};c&&n&&(t.rtx={ssrc:n}),r.push(t),i&&((t=JSON.parse(JSON.stringify(t))).fec={ssrc:c,mechanism:a?"red+ulpfec":"red"},r.push(t))}})),0===r.length&&c&&r.push({ssrc:c});var u=t.matchPrefix(e,"b=");return u.length&&(u=0===u[0].indexOf("b=TIAS:")?parseInt(u[0].substr(7),10):0===u[0].indexOf("b=AS:")?1e3*parseInt(u[0].substr(5),10)*.95-16e3:void 0,r.forEach((function(e){e.maxBitrate=u}))),r},t.parseRtcpParameters=function(e){var n={},r=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"cname"===e.attribute}))[0];r&&(n.cname=r.value,n.ssrc=r.ssrc);var o=t.matchPrefix(e,"a=rtcp-rsize");n.reducedSize=o.length>0,n.compound=0===o.length;var i=t.matchPrefix(e,"a=rtcp-mux");return n.mux=i.length>0,n},t.parseMsid=function(e){var n,r=t.matchPrefix(e,"a=msid:");if(1===r.length)return{stream:(n=r[0].substr(7).split(" "))[0],track:n[1]};var o=t.matchPrefix(e,"a=ssrc:").map((function(e){return t.parseSsrcMedia(e)})).filter((function(e){return"msid"===e.attribute}));return o.length>0?{stream:(n=o[0].value.split(" "))[0],track:n[1]}:void 0},t.parseSctpDescription=function(e){var n,r=t.parseMLine(e),o=t.matchPrefix(e,"a=max-message-size:");o.length>0&&(n=parseInt(o[0].substr(19),10)),isNaN(n)&&(n=65536);var i=t.matchPrefix(e,"a=sctp-port:");if(i.length>0)return{port:parseInt(i[0].substr(12),10),protocol:r.fmt,maxMessageSize:n};if(t.matchPrefix(e,"a=sctpmap:").length>0){var a=t.matchPrefix(e,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(a[0],10),protocol:a[1],maxMessageSize:n}}},t.writeSctpDescription=function(e,t){var n=[];return n="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&n.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),n.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,21)},t.writeSessionBoilerplate=function(e,n,r){var o=void 0!==n?n:2;return"v=0\r\no="+(r||"thisisadapterortc")+" "+(e||t.generateSessionId())+" "+o+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.writeMediaSection=function(e,n,r,o){var i=t.writeRtpDescription(e.kind,n);if(i+=t.writeIceParameters(e.iceGatherer.getLocalParameters()),i+=t.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===r?"actpass":"active"),i+="a=mid:"+e.mid+"\r\n",e.direction?i+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?i+="a=sendrecv\r\n":e.rtpSender?i+="a=sendonly\r\n":e.rtpReceiver?i+="a=recvonly\r\n":i+="a=inactive\r\n",e.rtpSender){var a="msid:"+o.id+" "+e.rtpSender.track.id+"\r\n";i+="a="+a,i+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a,e.sendEncodingParameters[0].rtx&&(i+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+a,i+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return i+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+t.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(i+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+t.localCName+"\r\n"),i},t.getDirection=function(e,n){for(var r=t.splitLines(e),o=0;o<r.length;o++)switch(r[o]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return r[o].substr(2)}return n?t.getDirection(n):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substr(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){var n=t.splitLines(e)[0].substr(2).split(" ");return{kind:n[0],port:parseInt(n[1],10),protocol:n[2],fmt:n.slice(3).join(" ")}},t.parseOLine=function(e){var n=t.matchPrefix(e,"o=")[0].substr(2).split(" ");return{username:n[0],sessionId:n[1],sessionVersion:parseInt(n[2],10),netType:n[3],addressType:n[4],address:n[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;for(var n=t.splitLines(e),r=0;r<n.length;r++)if(n[r].length<2||"="!==n[r].charAt(1))return!1;return!0},e.exports=t},90255:(e,t,n)=>{"use strict";var r=n(220773),o=n(725278),i=function(){function e(e){this.bytes=e}return e.prototype.write=function(e,t){return e.set(this.bytes,t),t+this.bytes.length},e.prototype.countSize=function(){return this.bytes.length},e}();t.Value=i;var a=function(){function e(e,n,r){this.id=e,this.children=n;var i=this.children.reduce((function(e,t){return e+t.countSize()}),0);this.sizeMetaData=r?t.UNKNOWN_SIZE:t.vintEncode(o.numberToByteArray(i,t.getEBMLByteLength(i))),this.size=this.id.length+this.sizeMetaData.length+i}return e.prototype.write=function(e,t){return e.set(this.id,t),e.set(this.sizeMetaData,t+this.id.length),this.children.reduce((function(t,n){return n.write(e,t)}),t+this.id.length+this.sizeMetaData.length)},e.prototype.countSize=function(){return this.size},e}();t.Element=a,t.bytes=r((function(e){return new i(e)})),t.number=r((function(e){return t.bytes(o.numberToByteArray(e))})),t.vintEncodedNumber=r((function(e){return t.bytes(t.vintEncode(o.numberToByteArray(e,t.getEBMLByteLength(e))))})),t.string=r((function(e){return t.bytes(o.stringToByteArray(e))})),t.element=function(e,t){return new a(e,Array.isArray(t)?t:[t],!1)},t.unknownSizeElement=function(e,t){return new a(e,Array.isArray(t)?t:[t],!0)},t.build=function(e){var t=new Uint8Array(e.countSize());return e.write(t,0),t},t.getEBMLByteLength=function(e){if(e<127)return 1;if(e<16383)return 2;if(e<2097151)return 3;if(e<268435455)return 4;if(e<34359738367)return 5;if(e<4398046511103)return 6;if(e<562949953421311)return 7;if(e<9007199254740992)return 8;throw e<72057594037927940?new Error("EBMLgetEBMLByteLength: number exceeds Number.MAX_SAFE_INTEGER"):new Error("EBMLgetEBMLByteLength: data size must be less than or equal to "+(Math.pow(2,56)-2))},t.UNKNOWN_SIZE=new Uint8Array([1,255,255,255,255,255,255,255]),t.vintEncode=function(e){return e[0]=t.getSizeMask(e.length)|e[0],e},t.getSizeMask=function(e){return 128>>e-1}},794943:(e,t)=>{"use strict";t.ID={EBML:Uint8Array.of(26,69,223,163),EBMLVersion:Uint8Array.of(66,134),EBMLReadVersion:Uint8Array.of(66,247),EBMLMaxIDLength:Uint8Array.of(66,242),EBMLMaxSizeLength:Uint8Array.of(66,243),DocType:Uint8Array.of(66,130),DocTypeVersion:Uint8Array.of(66,135),DocTypeReadVersion:Uint8Array.of(66,133),Void:Uint8Array.of(236),CRC32:Uint8Array.of(191),Segment:Uint8Array.of(24,83,128,103),SeekHead:Uint8Array.of(17,77,155,116),Seek:Uint8Array.of(77,187),SeekID:Uint8Array.of(83,171),SeekPosition:Uint8Array.of(83,172),Info:Uint8Array.of(21,73,169,102),SegmentUID:Uint8Array.of(115,164),SegmentFilename:Uint8Array.of(115,132),PrevUID:Uint8Array.of(60,185,35),PrevFilename:Uint8Array.of(60,131,171),NextUID:Uint8Array.of(62,185,35),NextFilename:Uint8Array.of(62,131,187),SegmentFamily:Uint8Array.of(68,68),ChapterTranslate:Uint8Array.of(105,36),ChapterTranslateEditionUID:Uint8Array.of(105,252),ChapterTranslateCodec:Uint8Array.of(105,191),ChapterTranslateID:Uint8Array.of(105,165),TimecodeScale:Uint8Array.of(42,215,177),Duration:Uint8Array.of(68,137),DateUTC:Uint8Array.of(68,97),Title:Uint8Array.of(123,169),MuxingApp:Uint8Array.of(77,128),WritingApp:Uint8Array.of(87,65),Cluster:Uint8Array.of(31,67,182,117),Timecode:Uint8Array.of(231),SilentTracks:Uint8Array.of(88,84),SilentTrackNumber:Uint8Array.of(88,215),Position:Uint8Array.of(167),PrevSize:Uint8Array.of(171),SimpleBlock:Uint8Array.of(163),BlockGroup:Uint8Array.of(160),Block:Uint8Array.of(161),BlockAdditions:Uint8Array.of(117,161),BlockMore:Uint8Array.of(166),BlockAddID:Uint8Array.of(238),BlockAdditional:Uint8Array.of(165),BlockDuration:Uint8Array.of(155),ReferencePriority:Uint8Array.of(250),ReferenceBlock:Uint8Array.of(251),CodecState:Uint8Array.of(164),DiscardPadding:Uint8Array.of(117,162),Slices:Uint8Array.of(142),TimeSlice:Uint8Array.of(232),LaceNumber:Uint8Array.of(204),Tracks:Uint8Array.of(22,84,174,107),TrackEntry:Uint8Array.of(174),TrackNumber:Uint8Array.of(215),TrackUID:Uint8Array.of(115,197),TrackType:Uint8Array.of(131),FlagEnabled:Uint8Array.of(185),FlagDefault:Uint8Array.of(136),FlagForced:Uint8Array.of(85,170),FlagLacing:Uint8Array.of(156),MinCache:Uint8Array.of(109,231),MaxCache:Uint8Array.of(109,248),DefaultDuration:Uint8Array.of(35,227,131),DefaultDecodedFieldDuration:Uint8Array.of(35,78,122),MaxBlockAdditionID:Uint8Array.of(85,238),Name:Uint8Array.of(83,110),Language:Uint8Array.of(34,181,156),CodecID:Uint8Array.of(134),CodecPrivate:Uint8Array.of(99,162),CodecName:Uint8Array.of(37,134,136),AttachmentLink:Uint8Array.of(116,70),CodecDecodeAll:Uint8Array.of(170),TrackOverlay:Uint8Array.of(111,171),CodecDelay:Uint8Array.of(86,170),SeekPreRoll:Uint8Array.of(86,187),TrackTranslate:Uint8Array.of(102,36),TrackTranslateEditionUID:Uint8Array.of(102,252),TrackTranslateCodec:Uint8Array.of(102,191),TrackTranslateTrackID:Uint8Array.of(102,165),Video:Uint8Array.of(224),FlagInterlaced:Uint8Array.of(154),FieldOrder:Uint8Array.of(157),StereoMode:Uint8Array.of(83,184),AlphaMode:Uint8Array.of(83,192),PixelWidth:Uint8Array.of(176),PixelHeight:Uint8Array.of(186),PixelCropBottom:Uint8Array.of(84,170),PixelCropTop:Uint8Array.of(84,187),PixelCropLeft:Uint8Array.of(84,204),PixelCropRight:Uint8Array.of(84,221),DisplayWidth:Uint8Array.of(84,176),DisplayHeight:Uint8Array.of(84,186),DisplayUnit:Uint8Array.of(84,178),AspectRatioType:Uint8Array.of(84,179),ColourSpace:Uint8Array.of(46,181,36),Colour:Uint8Array.of(85,176),MatrixCoefficients:Uint8Array.of(85,177),BitsPerChannel:Uint8Array.of(85,178),ChromaSubsamplingHorz:Uint8Array.of(85,179),ChromaSubsamplingVert:Uint8Array.of(85,180),CbSubsamplingHorz:Uint8Array.of(85,181),CbSubsamplingVert:Uint8Array.of(85,182),ChromaSitingHorz:Uint8Array.of(85,183),ChromaSitingVert:Uint8Array.of(85,184),Range:Uint8Array.of(85,185),TransferCharacteristics:Uint8Array.of(85,186),Primaries:Uint8Array.of(85,187),MaxCLL:Uint8Array.of(85,188),MaxFALL:Uint8Array.of(85,189),MasteringMetadata:Uint8Array.of(85,208),PrimaryRChromaticityX:Uint8Array.of(85,209),PrimaryRChromaticityY:Uint8Array.of(85,210),PrimaryGChromaticityX:Uint8Array.of(85,211),PrimaryGChromaticityY:Uint8Array.of(85,212),PrimaryBChromaticityX:Uint8Array.of(85,213),PrimaryBChromaticityY:Uint8Array.of(85,214),WhitePointChromaticityX:Uint8Array.of(85,215),WhitePointChromaticityY:Uint8Array.of(85,216),LuminanceMax:Uint8Array.of(85,217),LuminanceMin:Uint8Array.of(85,218),Audio:Uint8Array.of(225),SamplingFrequency:Uint8Array.of(181),OutputSamplingFrequency:Uint8Array.of(120,181),Channels:Uint8Array.of(159),BitDepth:Uint8Array.of(98,100),TrackOperation:Uint8Array.of(226),TrackCombinePlanes:Uint8Array.of(227),TrackPlane:Uint8Array.of(228),TrackPlaneUID:Uint8Array.of(229),TrackPlaneType:Uint8Array.of(230),TrackJoinBlocks:Uint8Array.of(233),TrackJoinUID:Uint8Array.of(237),ContentEncodings:Uint8Array.of(109,128),ContentEncoding:Uint8Array.of(98,64),ContentEncodingOrder:Uint8Array.of(80,49),ContentEncodingScope:Uint8Array.of(80,50),ContentEncodingType:Uint8Array.of(80,51),ContentCompression:Uint8Array.of(80,52),ContentCompAlgo:Uint8Array.of(66,84),ContentCompSettings:Uint8Array.of(66,85),ContentEncryption:Uint8Array.of(80,53),ContentEncAlgo:Uint8Array.of(71,225),ContentEncKeyID:Uint8Array.of(71,226),ContentSignature:Uint8Array.of(71,227),ContentSigKeyID:Uint8Array.of(71,228),ContentSigAlgo:Uint8Array.of(71,229),ContentSigHashAlgo:Uint8Array.of(71,230),Cues:Uint8Array.of(28,83,187,107),CuePoint:Uint8Array.of(187),CueTime:Uint8Array.of(179),CueTrackPositions:Uint8Array.of(183),CueTrack:Uint8Array.of(247),CueClusterPosition:Uint8Array.of(241),CueRelativePosition:Uint8Array.of(240),CueDuration:Uint8Array.of(178),CueBlockNumber:Uint8Array.of(83,120),CueCodecState:Uint8Array.of(234),CueReference:Uint8Array.of(219),CueRefTime:Uint8Array.of(150),Attachments:Uint8Array.of(25,65,164,105),AttachedFile:Uint8Array.of(97,167),FileDescription:Uint8Array.of(70,126),FileName:Uint8Array.of(70,110),FileMimeType:Uint8Array.of(70,96),FileData:Uint8Array.of(70,92),FileUID:Uint8Array.of(70,174),Chapters:Uint8Array.of(16,67,167,112),EditionEntry:Uint8Array.of(69,185),EditionUID:Uint8Array.of(69,188),EditionFlagHidden:Uint8Array.of(69,189),EditionFlagDefault:Uint8Array.of(69,219),EditionFlagOrdered:Uint8Array.of(69,221),ChapterAtom:Uint8Array.of(182),ChapterUID:Uint8Array.of(115,196),ChapterStringUID:Uint8Array.of(86,84),ChapterTimeStart:Uint8Array.of(145),ChapterTimeEnd:Uint8Array.of(146),ChapterFlagHidden:Uint8Array.of(152),ChapterFlagEnabled:Uint8Array.of(69,152),ChapterSegmentUID:Uint8Array.of(110,103),ChapterSegmentEditionUID:Uint8Array.of(110,188),ChapterPhysicalEquiv:Uint8Array.of(99,195),ChapterTrack:Uint8Array.of(143),ChapterTrackNumber:Uint8Array.of(137),ChapterDisplay:Uint8Array.of(128),ChapString:Uint8Array.of(133),ChapLanguage:Uint8Array.of(67,124),ChapCountry:Uint8Array.of(67,126),ChapProcess:Uint8Array.of(105,68),ChapProcessCodecID:Uint8Array.of(105,85),ChapProcessPrivate:Uint8Array.of(69,13),ChapProcessCommand:Uint8Array.of(105,17),ChapProcessTime:Uint8Array.of(105,34),ChapProcessData:Uint8Array.of(105,51),Tags:Uint8Array.of(18,84,195,103),Tag:Uint8Array.of(115,115),Targets:Uint8Array.of(99,192),TargetTypeValue:Uint8Array.of(104,202),TargetType:Uint8Array.of(99,202),TagTrackUID:Uint8Array.of(99,197),TagEditionUID:Uint8Array.of(99,201),TagChapterUID:Uint8Array.of(99,196),TagAttachmentUID:Uint8Array.of(99,198),SimpleTag:Uint8Array.of(103,200),TagName:Uint8Array.of(69,163),TagLanguage:Uint8Array.of(68,122),TagDefault:Uint8Array.of(68,132),TagString:Uint8Array.of(68,135),TagBinary:Uint8Array.of(68,133)}},36090:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(90255)),r(n(794943)),r(n(725278))},725278:(e,t,n)=>{"use strict";var r=n(220773);function o(e){if(e<0)throw new Error("EBML.typedArrayUtils.getNumberByteLength: negative number not implemented");if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;if(e<1099511627776)return 5;if(e<281474976710656)return 6;if(e<9007199254740992)return 7;throw new Error("EBML.typedArrayUtils.getNumberByteLength: number exceeds Number.MAX_SAFE_INTEGER")}t.numberToByteArray=function(e,t){var n;if(void 0===t&&(t=o(e)),1===t)(n=new DataView(new ArrayBuffer(1))).setUint8(0,e);else if(2===t)(n=new DataView(new ArrayBuffer(2))).setUint16(0,e);else if(3===t)(n=new DataView(new ArrayBuffer(3))).setUint8(0,e>>16),n.setUint16(1,65535&e);else if(4===t)(n=new DataView(new ArrayBuffer(4))).setUint32(0,e);else if(e<4294967295)(n=new DataView(new ArrayBuffer(5))).setUint32(1,e);else if(5===t)(n=new DataView(new ArrayBuffer(5))).setUint8(0,e/4294967296|0),n.setUint32(1,e%4294967296);else if(6===t)(n=new DataView(new ArrayBuffer(6))).setUint16(0,e/4294967296|0),n.setUint32(2,e%4294967296);else if(7===t)(n=new DataView(new ArrayBuffer(7))).setUint8(0,e/281474976710656|0),n.setUint16(1,e/4294967296&65535),n.setUint32(3,e%4294967296);else{if(8!==t)throw new Error("EBML.typedArrayUtils.numberToByteArray: byte length must be less than or equal to 8");(n=new DataView(new ArrayBuffer(8))).setUint32(0,e/4294967296|0),n.setUint32(4,e%4294967296)}return new Uint8Array(n.buffer)},t.stringToByteArray=r((function(e){return Uint8Array.from(Array.from(e).map((function(e){return e.codePointAt(0)})))})),t.getNumberByteLength=o,t.int16Bit=r((function(e){var t=new ArrayBuffer(2);return new DataView(t).setInt16(0,e),new Uint8Array(t)})),t.float32bit=r((function(e){var t=new ArrayBuffer(4);return new DataView(t).setFloat32(0,e),new Uint8Array(t)})),t.dumpBytes=function(e){return Array.from(new Uint8Array(e)).map((function(e){return"0x"+e.toString(16)})).join(", ")}},362548:function(e,t,n){e.exports=function(){"use strict";function e(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;var t=e((function(e,t){!function(t,n){e.exports=n()}(0,(function(){function e(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function t(e){return Array.isArray(e)?[]:{}}function n(n,r){return r&&!0===r.clone&&e(n)?i(t(n),n,r):n}function r(t,r,o){var a=t.slice();return r.forEach((function(r,s){void 0===a[s]?a[s]=n(r,o):e(r)?a[s]=i(t[s],r,o):-1===t.indexOf(r)&&a.push(n(r,o))})),a}function o(t,r,o){var a={};return e(t)&&Object.keys(t).forEach((function(e){a[e]=n(t[e],o)})),Object.keys(r).forEach((function(s){e(r[s])&&t[s]?a[s]=i(t[s],r[s],o):a[s]=n(r[s],o)})),a}function i(e,t,i){var a=Array.isArray(t),s=(i||{arrayMerge:r}).arrayMerge||r;return a?Array.isArray(e)?s(e,t,i):n(t,i):o(e,t,i)}return i.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,n){return i(e,n,t)}))},i}))}));function r(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).map((function(e){e(n)})),(e["*"]||[]).map((function(e){e(t,n)}))}}}var o=e((function(e,t){var n={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}};t.default=n,e.exports=t.default})),i=function(e){return Object.keys(e).map((function(t){return t+'="'+e[t].toString().replace(/"/g,"&quot;")+'"'})).join(" ")},a=o.svg,s=o.xlink,c={};c[a.name]=a.uri,c[s.name]=s.uri;var l,u=function(e,n){void 0===e&&(e="");var r=t(c,n||{});return"<svg "+i(r)+">"+e+"</svg>"},d=o.svg,_=o.xlink,p={attrs:(l={style:["position: absolute","width: 0","height: 0"].join("; "),"aria-hidden":"true"},l[d.name]=d.uri,l[_.name]=_.uri,l)},h=function(e){this.config=t(p,e||{}),this.symbols=[]};h.prototype.add=function(e){var t=this.symbols,n=this.find(e.id);return n?(t[t.indexOf(n)]=e,!1):(t.push(e),!0)},h.prototype.remove=function(e){var t=this.symbols,n=this.find(e);return!!n&&(t.splice(t.indexOf(n),1),n.destroy(),!0)},h.prototype.find=function(e){return this.symbols.filter((function(t){return t.id===e}))[0]||null},h.prototype.has=function(e){return null!==this.find(e)},h.prototype.stringify=function(){var e=this.config.attrs,t=this.symbols.map((function(e){return e.stringify()})).join("");return u(t,e)},h.prototype.toString=function(){return this.stringify()},h.prototype.destroy=function(){this.symbols.forEach((function(e){return e.destroy()}))};var f=function(e){var t=e.id,n=e.viewBox,r=e.content;this.id=t,this.viewBox=n,this.content=r};f.prototype.stringify=function(){return this.content},f.prototype.toString=function(){return this.stringify()},f.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach((function(t){return delete e[t]}))};var m=function(e){var t=!!document.importNode,n=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(n,!0):n},v=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,n=this.render();return this.node=n,t.appendChild(n),n},t.prototype.render=function(){var e=this.stringify();return m(u(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,n),t}(f),g={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},y=function(e){return Array.prototype.slice.call(e,0)},E={isChrome:function(){return/chrome/i.test(navigator.userAgent)},isFirefox:function(){return/firefox/i.test(navigator.userAgent)},isIE:function(){return/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)},isEdge:function(){return/edge/i.test(navigator.userAgent)}},w=function(e,t){var n=document.createEvent("CustomEvent");n.initCustomEvent(e,!1,!1,t),window.dispatchEvent(n)},b=function(e){var t=[];return y(e.querySelectorAll("style")).forEach((function(e){e.textContent+="",t.push(e)})),t},C=function(e){return(e||window.location.href).split("#")[0]},S=function(e){angular.module("ng").run(["$rootScope",function(t){t.$on("$locationChangeSuccess",(function(t,n,r){w(e,{oldUrl:r,newUrl:n})}))}])},T="linearGradient, radialGradient, pattern, mask, clipPath",A=function(e,t){return void 0===t&&(t=T),y(e.querySelectorAll("symbol")).forEach((function(e){y(e.querySelectorAll(t)).forEach((function(t){e.parentNode.insertBefore(t,e)}))})),e};function D(e,t){return y(e).reduce((function(e,n){if(!n.attributes)return e;var r=y(n.attributes),o=t?r.filter(t):r;return e.concat(o)}),[])}var P=o.xlink.uri,O="xlink:href",I=/[{}|\\\^\[\]`"<>]/g;function k(e){return e.replace(I,(function(e){return"%"+e[0].charCodeAt(0).toString(16).toUpperCase()}))}function R(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function M(e,t,n){return y(e).forEach((function(e){var r=e.getAttribute(O);if(r&&0===r.indexOf(t)){var o=r.replace(t,n);e.setAttributeNS(P,O,o)}})),e}var L=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],x=L.map((function(e){return"["+e+"]"})).join(","),N=function(e,t,n,r){var o=k(n),i=k(r);D(e.querySelectorAll(x),(function(e){var t=e.localName,n=e.value;return-1!==L.indexOf(t)&&-1!==n.indexOf("url("+o)})).forEach((function(e){return e.value=e.value.replace(new RegExp(R(o),"g"),i)})),M(t,o,i)},B={MOUNT:"mount",SYMBOL_MOUNT:"symbol_mount"};return function(e){function n(n){var o=this;void 0===n&&(n={}),e.call(this,t(g,n));var i=r();this._emitter=i,this.node=null;var a=this.config;if(a.autoConfigure&&this._autoConfigure(n),a.syncUrlsWithBaseTag){var s=document.getElementsByTagName("base")[0].getAttribute("href");i.on(B.MOUNT,(function(){return o.updateUrls("#",s)}))}var c=this._handleLocationChange.bind(this);this._handleLocationChange=c,a.listenLocationChangeEvent&&window.addEventListener(a.locationChangeEvent,c),a.locationChangeAngularEmitter&&S(a.locationChangeEvent),i.on(B.MOUNT,(function(e){a.moveGradientsOutsideSymbol&&A(e)})),i.on(B.SYMBOL_MOUNT,(function(e){a.moveGradientsOutsideSymbol&&A(e.parentNode),(E.isIE()||E.isEdge())&&b(e)}))}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var o={isMounted:{}};return o.isMounted.get=function(){return!!this.node},n.prototype._autoConfigure=function(e){var t=this.config;void 0===e.syncUrlsWithBaseTag&&(t.syncUrlsWithBaseTag=void 0!==document.getElementsByTagName("base")[0]),void 0===e.locationChangeAngularEmitter&&(t.locationChangeAngularEmitter=void 0!==window.angular),void 0===e.moveGradientsOutsideSymbol&&(t.moveGradientsOutsideSymbol=E.isFirefox())},n.prototype._handleLocationChange=function(e){var t=e.detail,n=t.oldUrl,r=t.newUrl;this.updateUrls(n,r)},n.prototype.add=function(t){var n=this,r=e.prototype.add.call(this,t);return this.isMounted&&r&&(t.mount(n.node),this._emitter.emit(B.SYMBOL_MOUNT,t.node)),r},n.prototype.attach=function(e){var t=this,n=this;if(n.isMounted)return n.node;var r="string"==typeof e?document.querySelector(e):e;return n.node=r,this.symbols.forEach((function(e){e.mount(n.node),t._emitter.emit(B.SYMBOL_MOUNT,e.node)})),y(r.querySelectorAll("symbol")).forEach((function(e){var t=v.createFromExistingNode(e);t.node=e,n.add(t)})),this._emitter.emit(B.MOUNT,r),r},n.prototype.destroy=function(){var e=this,t=e.config,n=e.symbols,r=e._emitter;n.forEach((function(e){return e.destroy()})),r.off("*"),window.removeEventListener(t.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},n.prototype.mount=function(e,t){void 0===e&&(e=this.config.mountTo),void 0===t&&(t=!1);var n=this;if(n.isMounted)return n.node;var r="string"==typeof e?document.querySelector(e):e,o=n.render();return this.node=o,t&&r.childNodes[0]?r.insertBefore(o,r.childNodes[0]):r.appendChild(o),this._emitter.emit(B.MOUNT,o),o},n.prototype.render=function(){return m(this.stringify())},n.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},n.prototype.updateUrls=function(e,t){if(!this.isMounted)return!1;var n=document.querySelectorAll(this.config.usagesToUpdate);return N(this.node,n,C(e)+"#",C(t)+"#"),!0},Object.defineProperties(n.prototype,o),n}(h)}()},887854:function(e,t,n){e.exports=function(){"use strict";var e=function(e){var t=e.id,n=e.viewBox,r=e.content;this.id=t,this.viewBox=n,this.content=r};e.prototype.stringify=function(){return this.content},e.prototype.toString=function(){return this.stringify()},e.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach((function(t){return delete e[t]}))};var t=function(e){var t=!!document.importNode,n=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(n,!0):n};function r(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;var o=r((function(e,t){!function(t,n){e.exports=n()}(0,(function(){function e(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function t(e){return Array.isArray(e)?[]:{}}function n(n,r){return r&&!0===r.clone&&e(n)?i(t(n),n,r):n}function r(t,r,o){var a=t.slice();return r.forEach((function(r,s){void 0===a[s]?a[s]=n(r,o):e(r)?a[s]=i(t[s],r,o):-1===t.indexOf(r)&&a.push(n(r,o))})),a}function o(t,r,o){var a={};return e(t)&&Object.keys(t).forEach((function(e){a[e]=n(t[e],o)})),Object.keys(r).forEach((function(s){e(r[s])&&t[s]?a[s]=i(t[s],r[s],o):a[s]=n(r[s],o)})),a}function i(e,t,i){var a=Array.isArray(t),s=(i||{arrayMerge:r}).arrayMerge||r;return a?Array.isArray(e)?s(e,t,i):n(t,i):o(e,t,i)}return i.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,n){return i(e,n,t)}))},i}))})),i=r((function(e,t){var n={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}};t.default=n,e.exports=t.default})),a=function(e){return Object.keys(e).map((function(t){return t+'="'+e[t].toString().replace(/"/g,"&quot;")+'"'})).join(" ")},s=i.svg,c=i.xlink,l={};l[s.name]=s.uri,l[c.name]=c.uri;var u=function(e,t){void 0===e&&(e="");var n=o(l,t||{});return"<svg "+a(n)+">"+e+"</svg>"},d=function(e){function n(){e.apply(this,arguments)}e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n;var r={isMounted:{}};return r.isMounted.get=function(){return!!this.node},n.createFromExistingNode=function(e){return new n({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},n.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},n.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,n=this.render();return this.node=n,t.appendChild(n),n},n.prototype.render=function(){var e=this.stringify();return t(u(e)).childNodes[0]},n.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(n.prototype,r),n}(e);return d}()},111317:function(e){e.exports=function(){"use strict";class e{constructor(e=0,t=0){this.first=null,this.items=Object.create(null),this.last=null,this.max=e,this.size=0,this.ttl=t}has(e){return e in this.items}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(e){if(this.has(e)){const t=this.items[e];delete this.items[e],this.size--,null!==t.prev&&(t.prev.next=t.next),null!==t.next&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),this.last===t&&(this.last=t.prev)}return this}evict(){const e=this.first;return delete this.items[e.key],this.first=e.next,this.first.prev=null,this.size--,this}get(e){let t;if(this.has(e)){const n=this.items[e];this.ttl>0&&n.expiry<=(new Date).getTime()?this.delete(e):(t=n.value,this.set(e,t,!0))}return t}keys(){return Object.keys(this.items)}set(e,t,n=!1){let r;if(n||this.has(e)){if(r=this.items[e],r.value=t,!1===n&&(r.expiry=this.ttl>0?(new Date).getTime()+this.ttl:this.ttl),this.last!==r){const e=this.last,t=r.next,n=r.prev;this.first===r&&(this.first=r.next),r.next=null,r.prev=this.last,e.next=r,null!==n&&(n.next=t),null!==t&&(t.prev=n)}}else this.max>0&&this.size===this.max&&this.evict(),r=this.items[e]={expiry:this.ttl>0?(new Date).getTime()+this.ttl:this.ttl,key:e,prev:this.last,next:null,value:t},1==++this.size?this.first=r:this.last.next=r;return this.last=r,this}}return function(t=1e3,n=0){if(isNaN(t)||t<0)throw new TypeError("Invalid max value");if(isNaN(n)||n<0)throw new TypeError("Invalid ttl value");return new e(t,n)}}()},196022:(e,t,n)=>{"use strict";n.d(t,{API_VERSION:()=>s,VK_WEB_APP_ID:()=>c,makeAuthAndApiGlobal:()=>g});var r=n(570655),o=n(470751),i=n(170890),a=n(19331),s="5.133",c=6287487,l=!1,u=!1,d=!1,_=!1,p="QbYic1K3lEV5kTGiqlq2",h=function(e){u||((0,o.setLoginConfig)((0,r.__assign)({appId:c},e)),u=!0)},f=function(e,t,n,i){return u?(0,o.login)(e,t,n,i).then((function(e){return _=Boolean(e.access_token),e})).catch((function(e){var t;if(console.error("[VKJS][AUTH]:",e),"unauthorized"===e.error&&"login_error"===e.type){var n=(0,a.partConfigEnabled)("loginvk_unauthorized_force_logout");if(console.error("[VKJS][AUTH]: logout "+(n?"enabled":"disabled")+" because ","loginvk_unauthorized_force_logout = ",n),n){(0,o.removeLoginCache)();var i=null===(t=document.getElementById("top_logout_link"))||void 0===t?void 0:t.href;if(!i){var s=window.location.origin;i=window.vk.loginDomain+"?act=logout&hash="+window.vk.ip_h+"&reason=tn&_origin="+s}return window.location.href=i,new Promise((function(){}))}}return(0,r.__assign)({access_token:"",error:!0},e)})):Promise.reject("[VKJS][LOGIN]: login didn't init. Use setLoginConfig function")},m=function(e){l?(0,i.setApiConfig)((0,r.__assign)({},e)):((0,i.setApiConfig)((0,r.__assign)({appId:c,version:s,onTokenExpired:function(){return f("web_token",{},{},!0).then((function(e){return e.access_token||""}))}},e)),l=!0)},v=function(e,t,n,o){if(void 0===o&&(o={}),!l)return Promise.reject("[VKJS][API]: api didn't init. Use setApiConfig function");if(!d)return f("web_token").then((function(a){d=!0,m({accessToken:a.access_token});var s=_?t:(0,r.__assign)({client_secret:p},t);return(0,i.api)(e,s,n,o)}));var a=_?t:(0,r.__assign)({client_secret:p},t);return(0,i.api)(e,a,n,o)},g=function(){window.vkApi||(window.vkApi={api:v,login:f,setLoginConfig:h,setApiConfig:m,removeLoginCache:o.removeLoginCache})}},189798:(e,t,n)=>{"use strict";n.d(t,{setLoginConfig:()=>r,setApiConfig:()=>o,api:()=>i,login:()=>a,removeLoginCache:()=>s});var r=function(e){return window.vkApi?window.vkApi.setLoginConfig(e):console.error("[VKJS]: setLoginConfig didn't allowed. Use makeAuthAndApiGlobal function")},o=function(e){return window.vkApi?window.vkApi.setApiConfig(e):console.error("[VKJS]: setApiConfig didn't allowed. Use makeAuthAndApiGlobal function")},i=function(e,t,n,r){return void 0===r&&(r={}),window.vkApi?window.vkApi.api(e,t,n,r):Promise.reject("[VKJS][API]: api didn't allowed. Use makeAuthAndApiGlobal function")},a=function(e,t,n,r){return window.vkApi?window.vkApi.login(e,t,n,r):Promise.reject("[VKJS]: login didn't allowed. Use makeAuthAndApiGlobal function")},s=function(e,t){return window.vkApi?window.vkApi.removeLoginCache(e,t):console.error("[VKJS]: removeLoginCache didn't allowed. Use makeAuthAndApiGlobal function")}},318941:(e,t,n)=>{"use strict";n.d(t,{AudioHlsNode:()=>u});var r=n(570655),o=n(366792),i=n(73665),a=n(830648),s=n(760847),c=n(602227),l=n(26330),u=function(){function e(e,t){var n=this;this.fullyLoaded=!1,this.url="",this.audioElement=new Audio,this.audioElement.crossOrigin="anonymous",this.audioElement.preload="auto",this.volume=e.volume,this.addEventListeners(e),t&&this.setUrl(t).then((function(){n.audioElement.load()}));var r=new a.NetworkStatCollector;this.audioNetworkStatCollector=new a.AudioNetworkStatCollector(r)}return Object.defineProperty(e.prototype,"isFullyLoaded",{get:function(){return this.fullyLoaded},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"error",{get:function(){return this.audioElement.error||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"played",{get:function(){return this.audioElement.played},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"src",{get:function(){return this.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hls",{get:function(){return this.hlsInstance||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return isFinite(this.audioElement.duration)?this.audioElement.duration:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"readyState",{get:function(){return this.audioElement.readyState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this.audioElement.currentTime},set:function(e){this.audioElement.currentTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this.audioElement.volume},set:function(e){this.audioElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playbackRate",{set:function(e){this.audioElement.playbackRate=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentProgress",{get:function(){return isNaN(this.audioElement.duration)?0:Math.max(0,Math.min(1,this.audioElement.currentTime/this.audioElement.duration))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentBuffered",{get:function(){return this.audioElement.buffered.length?Math.min(1,this.audioElement.buffered.end(0)/this.audioElement.duration):0},enumerable:!1,configurable:!0}),e.prototype.play=function(){return(0,c.wrapAudioPlay)(this.audioElement).catch((function(e){switch(e.code){case e.NOT_SUPPORTED_ERR:case e.ABORT_ERR:break;default:throw e}}))},e.prototype.pause=function(){this.audioElement.pause()},e.prototype.addEventListeners=function(e){var t=this;this.audioElement.addEventListener("pause",(function(){return e.onPause()})),this.audioElement.addEventListener("play",(function(){return e.onPlay()})),this.audioElement.addEventListener("progress",(function(){if(e.onBufferUpdate(),!t.hlsInstance){var n=t.audioElement.buffered;n.length&&Math.abs(n.end(n.length-1)-t.audioElement.duration)<1&&(t.fullyLoaded=!0)}})),this.audioElement.addEventListener("timeupdate",(function(){e.onProgressUpdate&&e.onProgressUpdate()})),this.audioElement.addEventListener("ended",(function(){e.onEnd&&e.onEnd()})),this.onFail=e.onFail||function(){},this.audioElement.addEventListener("error",(function(){t.onFail()})),this.audioElement.addEventListener("canplay",(function(){e.onCanPlay&&e.onCanPlay()})),this.audioElement.addEventListener("durationchange",(function(){e.onDurationChange&&e.onDurationChange()}))},e.isHlsUrl=function(e){return(0,o.audioUnmaskSource)(e).includes(".m3u8")},e.prototype.setUrl=function(t){var n=this,r=(0,o.audioUnmaskSource)(t);return this.url=r,e.isHlsUrl(r)&&!e.shouldUseNativeHls()&&"function"==typeof window.MediaSource?this.initHls(r).catch((function(){return n.onFail()})):(this.hlsInstance&&this.hlsInstance.destroy(),this.audioElement.src=r,this.audioElement.load(),Promise.resolve())},e.shouldUseNativeHls=function(){var e=(0,r.__read)(window.browser.version.split("."),1)[0],t=parseInt(e);return window.browser.safari||window.browser.msie_edge&&t>11&&t<78},e.prototype.initHls=function(t){var n=this;return e.loadHls().then((function(e){var o=e.default;return new Promise((function(e){var c=!1,u=!!l.default.get("_audio_hls_debug");n.hlsInstance&&n.hlsInstance.destroy();var d=new o({debug:u,maxBufferHole:3,nudgeOffset:.5,nudgeMaxRetry:5,maxFragLookUpTolerance:.2});d.on(o.Events.BUFFER_EOS,(function(){return n.fullyLoaded=!0})),d.on(o.Events.ERROR,(function(e,t){t.details===o.ErrorDetails.BUFFER_STALLED_ERROR&&(c=!0),(u||t.fatal)&&console.log("audio hls error",e,t),t.details===o.ErrorDetails.BUFFER_STALLED_ERROR&&(d.stopLoad(),d.startLoad()),t.fatal&&n.onFail({type:t.type,details:t.details,url:t.frag&&t.frag.url||t.context&&t.context.url,code:t.networkDetails?t.networkDetails.status:0})})),d.on(o.Events.FRAG_BUFFERED,(function(e,t){var o=(0,i.getCurrentAudio)(),l={owner_id:o.ownerId,audio_id:o.id,fragment_id:t.frag.sn.toString(),fragment_duration:Math.ceil(1e3*t.frag.duration).toString(),time_to_first_byte:Math.ceil(t.stats.tfirst-t.stats.trequest).toString(),time_to_first_frame:Math.ceil(t.stats.tload-t.stats.trequest).toString(),buffering_time:Math.ceil(t.stats.tbuffered-t.stats.trequest).toString()};c&&n.audioNetworkStatCollector.logEvent((0,r.__assign)((0,r.__assign)({},l),{event_type:a.AudioNetworkType.FRAGMENT_STALLED}),s.default.getConnectionType(),s.default.getConnectionEffectiveType()),c=!1,n.audioNetworkStatCollector.logEvent((0,r.__assign)((0,r.__assign)({},l),{event_type:a.AudioNetworkType.FRAGMENT_LOADED}),s.default.getConnectionType(),s.default.getConnectionEffectiveType())})),d.loadSource(t),d.attachMedia(n.audioElement),n.hlsInstance=d,e()}))}))},e.loadHls=function(){return n.e(24817).then(n.t.bind(n,867631,23))},e}()},767356:(e,t,n)=>{"use strict";n.d(t,{TaskName:()=>r,AudioTaskManager:()=>i});var r,o=n(804333);!function(e){e.URL="url",e.PLAYBACK_RATE="playback_rate",e.DELAY="delay",e.SEEK="seek",e.PAUSE="pause",e.PLAY="play",e.VOL_SET="vol_set",e.VOL_UP="vol_up",e.VOL_DOWN="vol_down"}(r||(r={}));var i=function(){function e(e){this.impl=e,this.taskIDCounter=1,this.tasks=[],this.taskInProgress=null,this.taskAbort=null}return e.prototype.newTask=function(e,t){var n,r,o=new Promise((function(e,t){n=e,r=t}));return this.tasks.push({name:e,fn:function(){return t().then(n).catch(r)},id:e+"_"+this.taskIDCounter++}),this.doTasks(),o},e.prototype.clearAllTasks=function(){this.taskAbort=this.taskInProgress,this.taskInProgress=null,this.tasks=[]},e.prototype.clearTask=function(e){this.tasks=this.tasks||[],this.tasks=this.tasks.filter((function(t){return t.name!==e}))},e.prototype.doTasks=function(){var e=this;if(!this.taskInProgress){var t=this.tasks.shift();t&&(this.taskInProgress=t.id,this.ensureImplReady().then((function(){return t.fn()})).then((function(){e.taskAbort!==t.id?(e.taskInProgress=null,e.doTasks()):e.taskAbort=null})))}},e.prototype.ensureImplReady=function(){var e=this;return new Promise((function(t){return e.impl.onReady(t)}))},e.prototype.delay=function(e){return this.newTask(r.DELAY,(function(){return new Promise((function(t){return(0,o.setWorkerTimeout)(t,e)}))}))},e.prototype.setUrl=function(e){var t=this;return this.newTask(r.URL,(function(){return new Promise((function(n){return t.impl.setUrl(e,n)}))}))},e.prototype.seekImmediate=function(e){this.impl.seek(e)},e.prototype.seek=function(e){var t=this;return this.clearTask(r.SEEK),this.newTask(r.SEEK,(function(){return new Promise((function(n){t.seekImmediate(e),n()}))}))},e.prototype.pause=function(){var e=this;return this.newTask(r.PAUSE,(function(){return new Promise((function(t){e.impl.pause(),t()}))}))},e.prototype.play=function(){var e=this;return window.browser.safari&&this.impl.play(),this.newTask(r.PLAY,(function(){return new Promise((function(t,n){e.impl.play().then(t).catch(n)}))}))},e.prototype.setVolume=function(e,t,n){var o=this;if(void 0===n&&(n=null),t){var i=e?r.VOL_UP:r.VOL_DOWN;return this.newTask(i,(function(){return new Promise((function(t){return o.impl.fadeVolume(e,n,(function(){return t()}))}))}))}return this.newTask(r.VOL_SET,(function(){return new Promise((function(t){o.impl.setVolume(e),t()}))}))},e.prototype.updatePlaybackRate=function(e){var t=this;return this.newTask(r.PLAYBACK_RATE,(function(){return new Promise((function(n){t.impl.setPlaybackRate(e),n()}))}))},e}()},331811:(e,t,n)=>{"use strict";n.d(t,{EventBus:()=>o});var r=n(570655),o=function(){function e(){this.subscriptions={}}return e.prototype.subscribe=function(e,t){var n=this;return Array.isArray(e)&&e.forEach((function(e){return n.subscribe(e,t)})),this.subscriptions[e]||(this.subscriptions[e]=[]),this.subscriptions[e].push(t),{unsubscribe:function(){return n.unsubscribe(e,t)}}},e.prototype.unsubscribe=function(e,t){if(this.subscriptions[e]){var n=this.subscriptions[e].indexOf(t);n>=0&&this.subscriptions[e].splice(n,1)}},e.prototype.emit=function(e){for(var t=this,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];this.precheck&&!this.precheck.apply(this,(0,r.__spreadArray)([e],(0,r.__read)(n)))||(this.onAnyCallBack&&setTimeout((function(){return t.onAnyCallBack.apply(t,(0,r.__spreadArray)([e],(0,r.__read)(n)))})),this.subscriptions[e]&&this.subscriptions[e].forEach((function(e){return setTimeout((function(){return e.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(n)))}))})))},e}()},772703:(e,t,n)=>{"use strict";n.d(t,{QueueListener:()=>r});var r=function(e){this.queueHandler=e}},143707:(e,t,n)=>{"use strict";function r(e){var t={};return e&&e.length&&e.filter((function(e){return!!e})).map((function(e){return e.queues&&e.queues[0]})).forEach((function(e){return t[e.type]=e})),t}n.d(t,{unpackQueues:()=>r})},801221:(e,t,n)=>{"use strict";n.d(t,{logDonutEvent:()=>a});var r=n(831683),o=n(740517),i=n(520820);function a(e,t){var n=(0,i.parseJSON)(e),a=n.type,s=n.type_property,c=n.params;s===o.ActionProductionStatEventTypes.TYPE_DONUT_PAYMENT_ITEM?r.donutStats.logEventAction({event_type:c.event_type,source:c.source,owner_id:c.owner_id}):t&&a===o.ProductionStatEventTypes.TYPE_NAVGO&&function(e,t){var n=t.params;if(t.typeProperty===o.NavigationProductionStatEventTypes.TYPE_DONUT_DESCRIPTION_NAV_ITEM){var i=n.owner_id,a=n.track_code;if(!n||"number"!=typeof i||"string"!=typeof a)return;r.donutStats.logEventDescriptionClick({ownerId:i,trackCode:a})}}(0,{typeProperty:s,params:c})}},831683:(e,t,n)=>{"use strict";n.d(t,{donutStats:()=>s});var r=n(570655),o=n(214547),i=n(740517),a=n(309195),s=new(function(){function e(){this.productionStatCollector=new o.ProductionStatCollector,this.actionStatCollector=new o.ActionStatCollector(this.productionStatCollector),this.navStatCollector=new o.NavigationStatCollector(this.productionStatCollector)}return e.prototype.logEventAction=function(t){return this.actionStatCollector.logEvent(e.createDonutActionStatEvent(t))},e.prototype.logEventActionView=function(e){return this.logEventAction((0,r.__assign)((0,r.__assign)({},e),{event_type:a.DonutActionEventType.PAYMENT_FORM}))},e.prototype.logEventDescriptionClick=function(t){this.navStatCollector.logEvent((0,r.__assign)((0,r.__assign)({},e.createNavStatEventBase()),e.createDescriptionClickStatEvent(t)))},e.createDonutActionStatEvent=function(e){var t;return(t={type:i.ActionProductionStatEventTypes.TYPE_DONUT_PAYMENT_ITEM})[i.ActionProductionStatEventTypes.TYPE_DONUT_PAYMENT_ITEM]=e,t},e.createNavStatEventBase=function(){return{screen:"wall",subtype:i.NavigationProductionStatEventTypes.GO}},e.createDescriptionClickStatEvent=function(t){var n;return(n={item:e.processClickParamsToEventItem(t),type:i.NavigationProductionStatEventTypes.TYPE_DONUT_DESCRIPTION_NAV_ITEM})[i.NavigationProductionStatEventTypes.TYPE_DONUT_DESCRIPTION_NAV_ITEM]={},n},e.processClickParamsToEventItem=function(e){return{type:i.EventItemType.BROWSER,owner_id:e.ownerId,track_code:e.trackCode}},e}())},146934:(e,t,n)=>{"use strict";n.d(t,{TaskQueue:()=>s});var r,o=n(570655),i=n(194795),a=n.n(i);!function(e){e.EV_GC_START="ev_gc_start",e.EV_GC_END="ev_gc_end",e.EV_PAUSED="ev_paused",e.EV_RESTARTED="ev_restarted",e.EV_NEW_HANDLER="ev_new_handler",e.EV_RM_HANDLER="ev_rm_handler",e.EV_TASK_START="ev_task_start"}(r||(r={}));var s=function(){function e(e){var t=this;void 0===e&&(e=function(){}),this._errorHandler=e,this._timerInterval=15,this._handlers=Object.create(null),this._emitter=new(a()),this._q=[],this.destroy=function(){t.pause(),clearInterval(t._gcTimer)},this.pause=function(){t._timer&&(clearTimeout(t._timer),t._timer=void 0,t._emitter.emit(r.EV_PAUSED))},this.restart=function(){t._timer||(t._next(),t._emitter.emit(r.EV_RESTARTED))},this.push=function(e){t._q.push(e),t.restart()},this.setHandler=function(e,n,o){void 0===o&&(o=!1),n.once=o,t._handlers[e]=n,t._emitter.emit(r.EV_NEW_HANDLER,e)},this.removeHandler=function(e){delete t._handlers[e],t._emitter.emit(r.EV_RM_HANDLER,e)},this._next()}return Object.defineProperty(e.prototype,"events",{get:function(){return this._emitter},enumerable:!1,configurable:!0}),e.migrate=function(t,n){void 0===n&&(n=function(){});var r=new e(n);return r.pause(),t&&t.destroy&&t._handlers&&t._q&&(t.destroy(),Object.keys(t._handlers).forEach((function(e){var n=t._handlers[e];r.setHandler(e,n,n.once)})),t._q.forEach((function(e){return r.push(e)}))),r.restart(),r},e.prototype.setupGc=function(t){this._gcTimer&&clearInterval(this._gcTimer),this._gcTimer=setInterval(this._gcTask.bind(this),t||e._gcDefaultInterval)},e.prototype._next=function(e){void 0===e&&(e=!1),this._timer=setTimeout(this._processNext.bind(this),e?0:this._timerInterval)},e.prototype._gcTask=function(){this.pause(),this._emitter.emit(r.EV_GC_START);var e=this._q.filter((function(e){return e.postponed}));this._q=this._q.filter((function(e){return!e.postponed})),this._emitter.emit(r.EV_GC_END,e),this.restart()},e.prototype._processNext=function(){var e=this,t=(0,o.__read)(this._q.splice(0,1),1)[0];if(t){var n,i=this._handlers[t.selector];if((null==i?void 0:i.once)&&this.removeHandler(t.selector),!i)return t.postponed||(t.postponed=!0),this._q.push(t),void(this._timer&&this._next());this._emitter.emit(r.EV_TASK_START,t.selector),window._tqVerbose&&console.info("Running evbus task",t.selector);try{n=Promise.resolve(i(t))}catch(e){n=Promise.reject(e)}n.then((function(){e._next(!0)}),(function(n){e._errorHandler&&e._errorHandler(t,n),e._next(!0)}))}else this.pause()},e._gcDefaultInterval=5e3,e}()},182804:(e,t,n)=>{"use strict";n.d(t,{init:()=>r.init,tq:()=>r.tq,processExecData:()=>o.processExecData});var r=n(70698),o=n(542459)},70698:(e,t,n)=>{"use strict";n.d(t,{isTQInitialized:()=>u,init:()=>d,tq:()=>p,tqi:()=>h,tqs:()=>f});var r=n(146934),o=n(542459),i=n(66433),a=function(e,t){var n={message:"Task execution error",data:{taskName:e.selector,type:void 0===e.payload.dataAttrs?"startup_task":"interactive_task",params:JSON.stringify(void 0===e.payload.dataAttrs?e.payload.data:e.payload.dataAttrs)}};(0,i.logError)(t,{environment:"task_queue",breadcrumb:n}),console.error(t)},s=function(){if(!document.head)throw new Error("Document must be loaded before queue init");return document.head},c=function(e){document.addEventListener("DOMContentLoaded",e),"interactive"!==document.readyState&&"complete"!==document.readyState||e()},l=function(){return c((function(){(0,o.unregisterGlobalTqHandlers)(document.body,s()._tqhl),s()._tqhl=(0,o.registerGlobalTqHandlers)(document.body)}))},u=function(){return!!s()._tq},d=function(){var e=s();u()?(e._tqi=r.TaskQueue.migrate(e._tqi,a),e._tqs=r.TaskQueue.migrate(e._tqs,a),l()):function(){var e=s();e._tqs=new r.TaskQueue(a),e._tqi=new r.TaskQueue(a),l(),e._tq={setInteractiveHandler:function(t,n,r){return void 0===r&&(r=!1),e._tqi.setHandler(t,n,r)},setStartupHandler:function(t,n,r){void 0===r&&(r=!1),e._tqs.setHandler(t,n,r),c((function(){e._tqs.setupGc(),e._tqs.restart()}))}},c((function(){e._tqi.setupGc(),(0,o.initMutationObserver)(),(0,o.processTreeOfNodes)(document)}))}()},_=function(e){return function(){var t=s();if(!t["_"+e])throw new Error(e+" not initialized");return t["_"+e]}},p=_("tq"),h=_("tqi"),f=_("tqs")},542459:(e,t,n)=>{"use strict";n.d(t,{processExecData:()=>c,processTreeOfNodes:()=>d,initMutationObserver:()=>_,registerGlobalTqHandlers:()=>p,unregisterGlobalTqHandlers:()=>h});var r=n(570655),o=n(70698),i={click:1,mouseover:1,mouseout:1,keyup:1,keydown:1,change:1,paste:1},a=["focus","mouseenter","mouseleave"],s=function(e){return function(t){var n;if(t.type===e&&t.target&&e&&(n=t.target.nodeType===Node.TEXT_NODE?t.target.parentNode:t.target,r=n,!Object.keys(r).some((function(e){return e.startsWith("_react")||e.startsWith("__react")}))&&n.dataset)){var r,i=n.dataset["task"+(e.toUpperCase()[0]+e.slice(1))];if(!i){if("click"!==t.type)return;var a=n.closest("[data-task-click]");if(!a)return;n=a,i=a.dataset["task"+(e.toUpperCase()[0]+e.slice(1))]}return i&&((0,o.tqi)().push({selector:i,payload:{target:n,dataAttrs:n.dataset,event:t},postponed:!1,createTime:Date.now()}),n.dataset.prevent)?(2&Number(n.dataset.prevent)&&t.stopPropagation(),t.preventDefault(),!1):void 0}}},c=function(e,t){var n={};try{n=JSON.parse(e)}catch(t){console.error("Failed to parse JSON: ",e)}for(var r in n)n.hasOwnProperty(r)&&(0,o.tqs)().push({selector:r,payload:{target:t,data:n[r]},postponed:!1,createTime:Date.now()})},l=function(e){if(e.matches("[data-exec]")){var t=e.dataset.exec||"{}";e.removeAttribute("data-exec"),c(t,e)}},u=function(e){var t,n,i,s=function(t){var n="data-task-"+t;if(e.hasAttribute(n)){var r=null!==(i=e.getAttribute(n))&&void 0!==i?i:"";e.removeAttribute(n),e.addEventListener(t,(function(t){var n=(0,o.tqi)()._handlers[r];Promise.resolve(null).then((function(){return null==n?void 0:n({selector:r,payload:{dataAttrs:e.dataset,target:e,event:t},postponed:!1,createTime:Date.now()})})).catch((function(e){return console.error(e)}))}))}};try{for(var c=(0,r.__values)(a),l=c.next();!l.done;l=c.next()){s(l.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}},d=function(e){var t,n,o,i,s,c;void 0===e&&(e=document);try{for(var d=(0,r.__values)(e.querySelectorAll("[data-exec]")),_=d.next();!_.done;_=d.next()){((g=_.value)instanceof HTMLElement||g instanceof SVGElement)&&l(g)}}catch(e){t={error:e}}finally{try{_&&!_.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}try{for(var p=(0,r.__values)(a),h=p.next();!h.done;h=p.next()){var f=h.value;try{for(var m=(s=void 0,(0,r.__values)(e.querySelectorAll("[data-task-"+f+"]"))),v=m.next();!v.done;v=m.next()){var g;((g=v.value)instanceof HTMLElement||g instanceof SVGElement)&&u(g)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}},_=function(){window._obs=new MutationObserver((function(e){var t,n,o,i;try{for(var a=(0,r.__values)(e),s=a.next();!s.done;s=a.next()){var c=s.value;try{for(var _=(o=void 0,(0,r.__values)(c.addedNodes)),p=_.next();!p.done;p=_.next()){var h=p.value;(h instanceof HTMLElement||h instanceof SVGElement)&&(l(h),u(h),d(h))}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=_.return)&&i.call(_)}finally{if(o)throw o.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}})),window._obs.observe(document,{subtree:!0,childList:!0,attributes:!0})},p=function(e){var t={};for(var n in i)if(i.hasOwnProperty(n)){var r=s(n);e.addEventListener(n,r),t[n]=r}return t},h=function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.removeEventListener(n,t[n])}},887294:(e,t,n)=>{"use strict";n.d(t,{post:()=>a,plaingetCancelable:()=>s});var r=n(570655),o=n(668040),i=n(638736);function a(e,t,n){return t&&(t.im_v=3),new Promise((function(o,i){window.ajax.post(e,t,{timeout:n,onDone:function(){o.apply(null,[(0,r.__spreadArray)([],(0,r.__read)(arguments))])},onFail:function(){return i.apply(null,(0,r.__spreadArray)([],(0,r.__read)(arguments))),!0}})}))}function s(e,t,n){void 0===n&&(n={});var r=new XMLHttpRequest;return{request:new Promise((function(a,s){var c,l=Date.now(),u=n.timeout||60,d=(0,o.toQueryString)(t);r.onreadystatechange=function(){if(4==r.readyState){if(window.clearInterval(c),(0,i.processWaf)(r))return;r.status>=200&&r.status<300?a([r.responseText,r]):s([r.responseText,r])}};try{r.open("GET",e+"?"+d,!0)}catch(e){return s([e,r])}r.send(),c=window.setInterval((function(){Date.now()-l>1e3*u&&(window.browser.safari&&r.abort(),s(["",{}]),window.clearInterval(c))}),1e3)})),cancel:function(){r.abort()}}}},511417:(e,t,n)=>{"use strict";n.d(t,{ColorSchemeMode:()=>r,ColorScheme:()=>l,colorScheme:()=>c});var r,o,i,a=n(376567),s=n(961540);!function(e){e.Light="light",e.Dark="dark",e.Auto="auto"}(r||(r={})),function(e){e.Dark="space_gray",e.Light="bright_light",e.WebDark="vkcom_dark",e.WebLight="vkcom_light"}(o||(o={})),function(e){e.Dark="#222222",e.Light="#ffffff"}(i||(i={}));var c,l=function(){function e(){this.currentMode="",this.subscribers=[],this.initSubscribers=[],this.isExecuted=!1,this.isModeSavingAllowed=!0,this.isSchemeSavingAllowed=!0}return e.prototype.init=function(t){var n=this;this.isExecuted||(this.schemesMap=t.schemesMap,this.setMode(t.mode),this.initSubscribers.forEach((function(e){e()})),e.isSchemesAutoSwitchingSupported()&&(window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(function(e){n.currentMode===r.Auto&&n.setScheme(e.matches)})),this.isExecuted=!0))},e.prototype.setScheme=function(t){var n;e.isSchemesSupported()&&(this.applyScheme(document.body,t?o.Dark:o.Light),this.currentIsDark=t,null===(n=document.querySelector("meta[name=theme-color]"))||void 0===n||n.setAttribute("content",t?i.Dark:i.Light),this.isSchemeSavingAllowed&&(0,a.setCookie)("remixdark_color_scheme",Number(t),365),this.subscribers.forEach((function(e){e()})))},e.prototype.isDarkScheme=function(){return this.currentIsDark},e.prototype.getMode=function(){return this.currentMode},e.prototype.setMode=function(t){this.currentMode=t;var n=!1;switch(t){case r.Light:n=!1;break;case r.Dark:n=!0;break;case r.Auto:if(e.isSchemesAutoSwitchingSupported())n=window.matchMedia("(prefers-color-scheme: dark)").matches}this.setScheme(n),this.isModeSavingAllowed&&(0,a.setCookie)("remixcolor_scheme_mode",t,365)},e.prototype.getScheme=function(){return(0,s.isMvk)()?this.getMVKScheme():this.getWebScheme()},e.prototype.getMVKScheme=function(){return this.isDarkScheme()?o.Dark:o.Light},e.prototype.getWebScheme=function(){return this.isDarkScheme()?o.WebDark:o.WebLight},e.prototype.applyScheme=function(e,t){var n,r=(null===(n=this.schemesMap)||void 0===n?void 0:n[t])||t;e.setAttribute("scheme",r)},e.prototype.subscribe=function(e){var t=this;return this.subscribers.push(e),function(){t.subscribers=t.subscribers.filter((function(t){return e!==t}))}},e.prototype.onInit=function(e){var t=this;return this.initSubscribers.push(e),function(){t.initSubscribers=t.initSubscribers.filter((function(t){return e!==t}))}},e.isSchemesSupported=function(){return(!(0,s.isMvk)()||window.isNewMail)&&window.CSS&&CSS.supports&&CSS.supports("color","var(--custom-property)")},e.isSchemesAutoSwitchingSupported=function(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme)").matches},e}();c=window.colorScheme?window.colorScheme:new l,window.colorScheme=c,window.isSchemesSupported=l.isSchemesSupported.bind(null)},638736:(e,t,n)=>{"use strict";n.d(t,{X_WAF_REDIRECT_HEADER:()=>i,isWAFHeaderReloadNeeded:()=>c,processWaf:()=>l});var r=n(19331),o=n(961540),i="X-WAF-Redirect",a=!1;function s(){return(0,r.partConfigEnabled)((0,o.isMvk)()?"mvk_waf_ajax_request_enabled":"waf_ajax_request_enabled")}function c(e){return void 0===e&&(e=""),s()&&""!==e}function l(e){if(!s())return!1;var t=!1;e instanceof XMLHttpRequest?t=c(e.getResponseHeader(i)||""):e&&(t=function(e){return s()&&429===e.status&&"429.html"===e.source}(e));return!!t&&(a||(a=!0,location.reload()),!0)}},153271:(e,t,n)=>{"use strict";function r(e){return navigator.clipboard?function(e){return navigator.clipboard.writeText(e)}(e):(o(e),Promise.resolve())}function o(e){var t=document.createElement("input"),n=document.activeElement;t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),n.focus()}n.d(t,{copyToClipboard:()=>r,_copyWithFakeElement:()=>o})},830104:(e,t,n)=>{"use strict";function r(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild}function o(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)}function i(e){var t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function a(){var e=document.documentElement;return{width:e.clientWidth,height:e.clientHeight}}function s(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n&&r?{width:n,height:r}:{width:e.offsetWidth,height:e.offsetHeight}}n.d(t,{createElementFromHTML:()=>r,emptyNode:()=>o,getElementOffset:()=>i,getViewportSize:()=>a,getElementSize:()=>s,getJsonDataValue:()=>c,setGlobalCustomProperty:()=>l,triggerAnimationClass:()=>u,findChildOrSelf:()=>d});var c=function(e,t){var n=e.getAttribute(t);if(n)try{return JSON.parse(n)}catch(e){return}},l=function(e,t){document.documentElement.style.setProperty(e,t)},u=function(e,t,n){e.classList.add(t),setTimeout((function(){e.classList.remove(t)}),n)};function d(e,t){return e.matches(t)?e:e.querySelector(t)}},721422:(e,t,n)=>{"use strict";n.d(t,{logError:()=>i,logEvalError:()=>a,debugBufferLog:()=>s});var r=n(436878),o=n(209509);function i(e,t){if(void 0===t&&(t={}),null===window||void 0===window?void 0:window.Raven){var n=t.breadcrumb,i=t.environment;n&&window.Raven.captureBreadcrumb({message:n.message,category:o.customBreadcrumbCategory,data:n.data}),i?window.Raven.captureException(e,{environment:i}):window.Raven.captureException(e),(0,r.logError)(e,t)}}function a(e,t){window.Raven&&(t&&t.length>2e3&&(t=t.slice(0,1e3)+"..."+t.slice(-1e3)),e.message+=": "+t,i(e))}function s(e){return i(e,{environment:"debugLog"})}},678276:(e,t,n)=>{"use strict";n.d(t,{isStuckError:()=>f,pruneRequestFromStuckErrors:()=>m});var r,o,i=n(570655),a=n(19331),s=n(743672),c=n(645611),l="mvk"===(null===(o=null===(r=window.vk)||void 0===r?void 0:r.statsMeta)||void 0===o?void 0:o.platform)&&(0,a.partConfigEnabled)("mute_mvk_err_peaks"),u=n(111317),d=10,_=l&&u(d),p=l&&u(d,5e3),h=function(e){var t=e.value,n=e.stacktrace,r=e.file,o=e.page;return[t,n.join(""),r,o].join("_")},f=function(e){if(!l||!p||!_)return!1;var t=h(e),n=(0,i.__read)([_.get(t)||0,p.get(t)||0],2),r=n[0],o=n[1];return _.set(t,++r),p.set(t,++o),o>=d||r>=50},m=l?function(e){var t,n,r=Date.now(),o="jsErrorLogs",a=(0,s.getWebStatsStringValue)(o,e);if(((null===(t=a.match(new RegExp("},{","g")))||void 0===t?void 0:t.length)||0)<d)return e;try{n=JSON.parse(a)}catch(e){(0,c.logProcessingTime)(1,"dedupe-fail")}if(!n)return e;var l=Object.values(n.reduce((function(e,t){var n,r=h(t),o=e[r]||[];return(0,i.__assign)((0,i.__assign)({},e),((n={})[r]=o.length<d?o.concat(t):o,n))}),{})),u=e.replace('"jsErrorLogs":'+a,'"jsErrorLogs":'+JSON.stringify([].concat.apply([],l))),_=Date.now()-r;return _>16&&(0,c.logProcessingTime)(_,"dedupe"),u}:function(e){return e}},66433:(e,t,n)=>{"use strict";n.d(t,{prepareError:()=>r.prepareError,getRavenXhrTransport:()=>o.getRavenXhrTransport,logError:()=>i.logError,debugBufferLog:()=>i.debugBufferLog,logEvalError:()=>i.logEvalError});var r=n(174146),o=n(934707),i=n(721422)},174146:(e,t,n)=>{"use strict";function r(e,t){var n=e.exception&&e.exception.values[0]||{type:"Message",value:e.message+o(e),stacktrace:e.stacktrace||{frames:[]}};"Error"===n.type&&n.value.startsWith("Non-Error exception captured with keys:")&&(n.value+=o(e)),!n.value&&e.message&&(n.value=e.message);var r=n.type,s=n.value,c=n.stacktrace,l=window.location,u=l.origin,d=l.protocol,_=l.hostname,p=l.port,h=l.href;p=p?":"+p:"",u=u||d+"//"+_+p;var f=e.environment,m=e.transaction,v=e.breadcrumbs;return{id:e.event_id,module:f||t(m,c,s),type:r,value:s,file:m,breadcrumbs:i(v),stacktrace:a(c,u),page:h,release:window.vk.rv,time:window.vk.ts+Math.floor(((new Date).getTime()-window.vk.started)/1e3)}}function o(e){return e.extra&&e.extra.__serialized__?"\n"+JSON.stringify(e.extra.__serialized__).slice(0,500):""}function i(e){if(!e||!e.values||0===e.values.length)return"";var t=e.values[0],n=t.data,r=t.category,o=t.message;return"xhr"===r?n.method+":"+n.status_code+":"+n.url:"custom"===r?o+":"+JSON.stringify(n):""}function a(e,t){var n=[];return e.frames.forEach((function(e,r){0===r&&(e.filename.includes("raven_logger.js")||e.filename.includes("raven.js"))||n.push(e.filename.replace(t,"")+":"+e.lineno+":"+e.colno+":"+e.function)})),n}n.d(t,{prepareError:()=>r})},934707:(e,t,n)=>{"use strict";n.d(t,{getRavenXhrTransport:()=>i});var r=n(171516),o=n(678276),i=function(e){return function(t){var n=t.data,i=t.onSuccess,a=e(n);!(0,o.isStuckError)(a)&&(0,r.saveJsErrorLogs)(a),i()}}},849464:(e,t,n)=>{"use strict";n.d(t,{NarrativeAnalyticEventType:()=>r,NarrativeAnalyticNavScreen:()=>o,sendNarrativeAnalytic:()=>s});var r,o,i=n(479957),a=n(19331);function s(e,t,n){var r;void 0===n&&(n=o.other);var s=(null==t?void 0:t.title)||void 0,c=(null==t?void 0:t.customCover)?0:(null==t?void 0:t.coverStoryId)||0,l=(null==t?void 0:t.id)||0,u=(null==t?void 0:t.ownerId)||0,d=null===(r=null==t?void 0:t.stories)||void 0===r?void 0:r.map((function(e){return e.id})),_={event_type:e,nav_screen:n,narrative_owner_id:u,narrative_id:l,narrative_title:s,story_ids:(null==d?void 0:d.length)?d:void 0,cover_story_id:c};(0,i.statlogsValueEvent)("narrative_product_analytic",_),(0,a.partConfigEnabled)("narratives_web_analytic_debug")&&console.log("-- narrative analytic",_)}!function(e){e.clickToAddToNarrative="click_to_add_to_narrative",e.addStoryToNarrative="add_story_to_narrative",e.openNarrativeList="open_narrative_list",e.close="close",e.changeSort="change_sort",e.publishNarrative="publish_narrative",e.createNarrative="create_narrative",e.deleteNarrative="delete_narrative",e.clickToEditNarrative="click_to_edit_narrative",e.editNarrative="edit_narrative",e.addToBookmarks="add_to_bookmarks",e.shareNarrative="share_narrative",e.seeMore="see_more",e.addToNarrativeFromActionSheet="add_to_narrative_from_action_sheet"}(r||(r={})),function(e){e.storyArchive="story_archive",e.storyViewer="story_viewer",e.profile="profile",e.feedBlock="narratives_feed_block",e.club="club",e.other="other"}(o||(o={}))},520820:(e,t,n)=>{"use strict";n.d(t,{parseJSON:()=>i});var r=n(66433),o=n(209509);function i(e){try{return JSON.parse(e)}catch(n){var t={environment:"parseJsonError",breadcrumb:{message:"Uncaught json parse error",data:{json:e},category:o.customBreadcrumbCategory}};return(0,r.logError)(n,t),{}}}},35779:(e,t,n)=>{"use strict";n.d(t,{logQuestionError:()=>o});var r=n(66433);function o(e,t){if(t?console.error(e,t):console.error(e),e instanceof Error){var n=new Error(o(e.message,t));return n.name=e.name,n.stack=e.stack,void(0,r.logError)(e)}function o(e,t){return t?t+": "+e:e}"string"!=typeof e?e instanceof Object?(0,r.logError)(new Error(o(JSON.stringify(e),t))):e||!t||(0,r.logError)(new Error(t)):(0,r.logError)(new Error(o(e,t)))}},637482:(e,t,n)=>{"use strict";n.d(t,{QuestionsStatCollector:()=>c});var r=n(214547),o=n(740517),i=n(19331),a=n(664260),s=n(632010),c=function(){function e(){this.productionStatCollector=new r.ProductionStatCollector,this.clickStatCollector=new r.ClickStatCollector(this.productionStatCollector)}return e.prototype.logClickEvent=function(e,t){var n;void 0===t&&(t={});var r=((n={type:o.ClickProductionStatEventTypes.TYPE_QUESTION_ITEM})[o.ClickProductionStatEventTypes.TYPE_QUESTION_ITEM]={type:e,screen:t.navScreen||window.cur.module||""},n);t.questionReceiverId&&(r[o.ClickProductionStatEventTypes.TYPE_QUESTION_ITEM].question_receiver_id=t.questionReceiverId),t.questionAuthorId&&(r[o.ClickProductionStatEventTypes.TYPE_QUESTION_ITEM].question_author_id=t.questionAuthorId),t.questionText&&(r[o.ClickProductionStatEventTypes.TYPE_QUESTION_ITEM].question_text=t.questionText);var a={type:o.EventItemType.QUESTION,id:t.questionId||0};(0,i.partConfigEnabled)("profile_questions_analytic_debug")&&console.log("--"+e,r,a),this.clickStatCollector.logEvent(r,a)},e.prototype.logOpeningEvent=function(e,t,n){var r;switch(t){case s.QuestionsBoxRef.STORY:r=n===a.QuestionAnalyticBoxName.askQuestion?a.QuestionAnalyticEventType.openAskQuestionFromStory:a.QuestionAnalyticEventType.openMyQuestionsFromStory;break;case s.QuestionsBoxRef.SNIPPET:r=n===a.QuestionAnalyticBoxName.askQuestion?a.QuestionAnalyticEventType.openAskQuestionFromSnippet:a.QuestionAnalyticEventType.openMyQuestionsFromSnippet;break;default:r=n===a.QuestionAnalyticBoxName.askQuestion?a.QuestionAnalyticEventType.openAskQuestionFromUrl:a.QuestionAnalyticEventType.openMyQuestionsFromUrl}var o={questionReceiverId:e};n===a.QuestionAnalyticBoxName.askQuestion&&(o.questionAuthorId=window.vk.id),this.logClickEvent(r,o)},e}()},734234:(e,t,n)=>{"use strict";n.d(t,{logQuestionsClickEvent:()=>o,logQuestionsOpeningEvent:()=>i});var r=new(n(637482).QuestionsStatCollector);function o(e,t){void 0===t&&(t={}),r.logClickEvent(e,t)}function i(e,t,n){r.logOpeningEvent(e,t,n)}},664260:(e,t,n)=>{"use strict";n.d(t,{QuestionAnalyticEventType:()=>r,QuestionAnalyticBoxName:()=>o});var r,o;n(740517);!function(e){e.clickToQuestion="click_to_question",e.reply="reply",e.replyAgain="reply_again",e.sharing="sharing",e.shareToStory="share_to_story",e.shareToWall="share_to_wall",e.shareToGroup="share_to_group",e.shareToIm="share_to_im",e.openStory="open_story",e.callFriends="call_friends",e.openSettings="open_settings",e.openProfile="open_profile",e.block="block",e.unblock="unblock",e.deleteAllQuestions="delete_all_questions",e.delete="delete",e.cancelDelete="cancel_delete",e.next="next",e.close="close",e.clickToSend="click_to_send",e.sendQuestion="send_question",e.cancelSendQuestion="cancel_send_question",e.cancelWriteAnswer="cancel_write_answer",e.closeMyQuestions="close_my_questions",e.openMyQuestionsFromUrl="open_my_questions_from_url",e.openAskQuestionFromUrl="open_ask_question_from_url",e.openMyQuestionsFromSnippet="open_my_questions_from_snippet",e.openAskQuestionFromSnippet="open_ask_question_from_snippet",e.openMyQuestionsFromStory="open_my_questions_from_story",e.openAskQuestionFromStory="open_ask_question_from_story"}(r||(r={})),function(e){e[e.askQuestion=0]="askQuestion",e[e.myQuestions=1]="myQuestions"}(o||(o={}))},570313:(e,t,n)=>{"use strict";function r(e,t){var n,r=t.timeout,o=t.onLoad,i=t.onError,a=document.createElement("script");function s(){a.readyState&&"loaded"!==a.readyState&&"complete"!==a.readyState||(l(),o&&o())}function c(){l(),i&&i()}function l(){clearTimeout(n),a.removeEventListener("load",s),a.removeEventListener("readystatechange",s),a.removeEventListener("error",c)}return a.addEventListener("load",s),a.addEventListener("readystatechange",s),a.addEventListener("error",c),a.src=e,document.head.appendChild(a),r&&(n=setTimeout(c,r)),{destroy:function(){l()}}}n.d(t,{loadScript:()=>r})},209509:(e,t,n)=>{"use strict";n.d(t,{CustomSentryErrorTypes:()=>r,errorEventNames:()=>i,moduleDetectionConfig:()=>a,commonIgnoreErrors:()=>s,PROTECTED_MODULE_NAME_TAG:()=>c,topErrorModuleName:()=>l,customBreadcrumbCategory:()=>u,anonymousName:()=>d,nativeCode:()=>_,extensionPrefixes:()=>p,Error:()=>h,TypeError:()=>f});var r,o=n(130360);!function(e){e.ERROR_OF_EXTENSION="ErrorOfExtension",e.KNOWN_ISSUE="KnownIssue"}(r||(r={}));var i={0:"common_type_error",1:"static_load_error",3:"ajax_bad_response",4:"ajax_error_code",5:"ajax_parse_error",6:"nav_go_script_error",7:"eval_box_script_error",8:"eval_frame_script_error",100:"root_al_server_error",101:"html_audio_load_error",102:"photo_upload_error",103:"show_box_script_error"},a={some:{videoplayer:function(e){return null==e?void 0:e.some((function(e){return"dist/videoplayer_v2"===e.module}))}},includes:{im:"web/imn",messenger:"bundles/fastchat_reforged",audioplayer:"bundles/audioplayer",videoplayer:"dist/videoplayer",stories:"web/stories",notifier:"web/notifier",articles:"web/article",market:"web/market",calls:"web/calls"}},s=[/^AbortError:/],c="__protectedModuleName",l="genericVkError",u="custom",d=(0,o.getFunctionName)(void 0),_="[native code]",p=["chrome","moz","safari","safari-web"].map((function(e){return e+"-extension://"})),h="Error",f="TypeError"},436878:(e,t,n)=>{"use strict";n.d(t,{logError:()=>i});var r=n(82991),o=n(209509);function i(e,t){var n=void 0===t?{}:t,i=n.breadcrumb,a=n.environment,s=n.hasDummyStacktrace,c=(0,r.getGlobalObject)();if(null==c?void 0:c.Sentry)return s&&"object"==typeof e&&(null==e?void 0:e.stack)&&delete e.stack,c.Sentry.captureException(e,(function(e){var t,n,r=a||(null===(n=c.cur)||void 0===n?void 0:n.module);return r&&e.setTags(((t={module:r})[o.PROTECTED_MODULE_NAME_TAG]=!0,t)),i&&e.addBreadcrumb({message:i.message,category:o.customBreadcrumbCategory,data:i.data}),e}))}},961540:(e,t,n)=>{"use strict";n.d(t,{VK_SITE_REGEX_SOURCE_UNSAFE:()=>a,VK_HOST_REGEX_UNSAFE:()=>s,VK_HOST_REGEX_GROUP_UNSAFE:()=>c,VK_ORIGIN_REGEX:()=>u,VK_ORIGIN_REGEX_STRICT:()=>d,VK_URL_REGEX:()=>_,VK_URL_REGEX_STRICT:()=>p,isMvk:()=>h,getHostName:()=>f,getVideoDuration:()=>m,noop:()=>v,getAverageRGB:()=>g,loadImage:()=>y,loadImages:()=>E,loadFontFace:()=>w,loadFontFacePromise:()=>b,getCroppedImage:()=>C});var r=n(570655),o=n(40906),i=["vk.com","vk.ru",f()].filter((function(e,t,n){return n.indexOf(e)===t})).concat(["vkontakte.ru","vk.me","userapi.com"]),a=(0,o.escapeRE)(f()),s=new RegExp("("+i.map(o.escapeRE).join("|")+")"),c=new RegExp(i.map(o.escapeRE).join("|")),l=(new RegExp("^"+s.source+"$"),new RegExp("([a-zA-Z0-9\\.\\_\\-]+\\.)?"+s.source)),u=(new RegExp("^"+l.source+"$"),new RegExp("^(https?:\\/\\/)?"+l.source+"$")),d=new RegExp("^(https?:\\/\\/)"+l.source+"$"),_=new RegExp("^(https?:\\/\\/)?"+l.source+"($|\\/(.*))"),p=new RegExp("^(https?:\\/\\/)"+l.source+"($|\\/(.*))");function h(){return!!window.isMVK}function f(){var e;return(null===(e=("undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).vk)||void 0===e?void 0:e.__domain)||"vk.com"}function m(e){return void 0===e&&(e=""),new Promise((function(t,n){var r=document.createElement("video");r.addEventListener("loadedmetadata",(function(){return t(r.duration)}),{once:!0}),r.addEventListener("error",n,{once:!0}),r.crossOrigin="anonymous",r.preload="metadata",r.src=e}))}var v=function(){};function g(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=0);var i,a={r:0,g:0,b:0};r=r||e.canvas.width,o=o||e.canvas.height;try{i=e.getImageData(t,n,r,o)}catch(e){return a}for(var s=-4,c=0;(s+=20)<i.data.length;)++c,a.r+=i.data[s],a.g+=i.data[s+1],a.b+=i.data[s+2];return a.r=~~(a.r/c),a.g=~~(a.g/c),a.b=~~(a.b/c),a}function y(e){return new Promise((function(t,n){var r=new Image;r.crossOrigin=e.startsWith("data:")?null:"Anonymous",r.onerror=function(){return n(new Error("Failed to load image's URL: "+e))},r.onload=function(){return t(r)},r.src=e}))}var E=function(e){return new Promise((function(t){var n=e.map((function(e){return y(e)}));Promise.all(n).then((function(e){return t(e)})).catch((function(){}))}))};function w(e,t){var n,r,o,i,a,s,c,l,u={normal:"400",500:"500",600:"600",bold:"700"},d={tolerance:2,delay:100,glyphs:"",success:function(){},error:function(){},timeout:5e3,weight:"400",style:"normal"},_={display:"block","font-size":"48px","line-height":"normal","font-variant":"normal","white-space":"nowrap",position:"absolute",visibility:"hidden",top:"-9999px",left:"-9999px",width:"auto",height:"auto",margin:"0",padding:"0"};function p(e){var t=[];return each(e,(function(e,n){t.push(e+":"+n)})),t.join(";")}function h(e,t,n){return Math.abs(e.width-t.offsetWidth)>n||Math.abs(e.height-t.offsetHeight)>n}function f(){i||(utilsNode.appendChild(a),i=!0,o={sansSerif:{width:c.offsetWidth,height:c.offsetHeight},serif:{width:s.offsetWidth,height:s.offsetHeight}},browser.opera&&!browser.chrome?(c.style.fontFamily='"'+e+'", sans-serif',s.style.fontFamily='"'+e+'", serif'):(setStyle(c,"font-family",'"'+e+'", sans-serif'),setStyle(s,"font-family",'"'+e+'", serif'))),i&&o&&(h(o.sansSerif,c,t.tolerance)||h(o.serif,s,t.tolerance))?(re(a),t.success()):(new Date).getTime()-r.getTime()>t.timeout?(re(a),t.error()):!i&&"requestAnimationFrame"in window?window.requestAnimationFrame(f):window.setTimeout(f,t.delay)}for(var m in d)t.hasOwnProperty(m)||(t[m]=d[m]);_["font-weight"]=t.weight,_["font-style"]=t.style,!t.glyphs&&"fonts"in document?(t.timeout&&(n=setTimeout((function(){t.error()}),t.timeout)),function(n){each(null===document||void 0===document?void 0:document.fonts,(function(r){r.family.toLowerCase()===e.toLowerCase()&&(u[r.weight]||r.weight)===""+t.weight&&r.style===t.style&&r.load().then((function(){t.success(),clearTimeout(n)}))}))}(n)):(l="AxmTYklsjo190QW"+t.glyphs,r=new Date,a=ce("div"),c=ce("div",{innerHTML:l}),s=ce("div",{innerHTML:l}),c.setAttribute("style",p(extend({"font-family":"sans-serif"},_))),s.setAttribute("style",p(extend({"font-family":"serif"},_))),a.appendChild(c),a.appendChild(s),f())}function b(e,t){return new Promise((function(n,o){w(e,(0,r.__assign)((0,r.__assign)({},t),{glyphs:"",success:function(){var e=function(){n(),(null==t?void 0:t.success)&&t.success()};browser.safari?setTimeout(e,150):e()},error:function(){o(),(null==t?void 0:t.error)&&t.error()}}))}))}function C(e,t,n,r,o,i){return void 0===i&&(i=0),new Promise((function(a,s){("string"==typeof e?y(e):Promise.resolve(e)).then((function(e){var c=document.createElement("canvas");c.width=90===i||270===i?e.naturalHeight:e.naturalWidth,c.height=90===i||270===i?e.naturalWidth:e.naturalHeight;var l=c.getContext("2d");if(l){l.fillStyle="#fff",l.fillRect(0,0,l.canvas.width,l.canvas.height),i?(l.translate(c.width/2,c.height/2),l.rotate(i*Math.PI/180),l.drawImage(e,-e.naturalWidth/2,-e.naturalHeight/2)):l.drawImage(e,0,0);var u=l.getImageData(t,n,r,o),d=document.createElement("canvas");d.width=r,d.height=o;var _=d.getContext("2d");if(_)return _.putImageData(u,0,0),y(d.toDataURL("image/jpeg",1)).then(a).catch(s);a(e)}else a(e)})).catch(s)}))}},522683:(e,t,n)=>{"use strict";n.d(t,{vkLocalStorage:()=>u,vkSessionStorage:()=>p,bestAvailableStorage:()=>f});var r,o=function(){function e(){var e=this;this.data={},this.getItem=function(t){return e.data.hasOwnProperty(t)?e.data[t]:null},this.keys=function(){return Object.keys(e.data)}}return e.prototype.setItem=function(e,t){this.data[e]=String(t)},e.prototype.removeItem=function(e){delete this.data[e]},e.prototype.clear=function(){this.data={}},Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.data).length},enumerable:!1,configurable:!0}),e.prototype.key=function(e){return Object.keys(this.data)[e]},e}(),i="vk-ls-dummy",a=Math.random().toString();function s(e){var t=!1;try{var n=window[e];n.setItem(i,a),t=a===n.getItem(i),n.removeItem(i)}catch(e){return!1}return t}function c(){return r||(r=s("localStorage")?window.localStorage:new o)}var l,u={setItem:function(e,t){return c().setItem(e,t)},getItem:function(e){return c().getItem(e)},removeItem:function(e){return c().removeItem(e)},clear:function(){return c().clear()},length:function(){return c().length},key:function(e){return c().key(e)},keys:function(){var e=c();return e instanceof o?e.keys():Object.keys(e)},getPrefixedKeys:function(e){return u.keys().filter((function(t){return t.startsWith(e)}))}};function d(){return l||(l=s("sessionStorage")?window.sessionStorage:new o)}var _,p={setItem:function(e,t){return d().setItem(e,t)},getItem:function(e){return d().getItem(e)},removeItem:function(e){return d().removeItem(e)},clear:function(){return d().clear()},length:function(){return d().length},key:function(e){return d().key(e)},keys:function(){var e=d();return e instanceof o?e.keys():Object.keys(e)},getPrefixedKeys:function(e){return p.keys().filter((function(t){return t.startsWith(e)}))}};function h(){return _||(_=s("localStorage")?window.localStorage:s("sessionStorage")?window.sessionStorage:new o)}var f={setItem:function(e,t){return h().setItem(e,t)},getItem:function(e){return h().getItem(e)},removeItem:function(e){return h().removeItem(e)},clear:function(){return h().clear()},length:function(){return h().length},key:function(e){return h().key(e)},keys:function(){var e=h();return e instanceof o?e.keys():Object.keys(e)},getPrefixedKeys:function(e){return f.keys().filter((function(t){return t.startsWith(e)}))}}},404291:(e,t,n)=>{"use strict";n.d(t,{saveStats:()=>g});var r,o=n(570655),i=n(743672),a=n(155695),s=n(645611),c=n(961540),l=n(862110),u=n(678276),d=n(228200),_=1e4,p=0,h=function(){return p*_},f=function(){return!(Date.now()-(0,i.getLastSendTime)()>45e3+h())},m=function(){return r=void 0},v=function(){!0!==r&&(clearTimeout(r),r=window.setTimeout((function(){var e=(0,i.getWebStatDataLs)();m(),e.length>i.emptyStatsDataLs.length&&g(e)}),Math.max(_,(0,i.getLastSendTime)()+45e3-Date.now()+h())))};function g(e,t){var n=e.length>=s.MAX_BODY_SIZE,h=(null==t?void 0:t.force)||n;return!h&&(r||f()||e.length<=i.emptyStatsDataLs.length)?((0,a.logWebStatsEvent)("WebStats delayed.",r),v()):(r=!0,function(e,t){var n=function(t){return setTimeout((function(){return e()}),t)};return(null==t?void 0:t.force)?n(0):window.requestIdleCallback((function(){return n(_)}),{timeout:5e3})}((function(){var e=(0,i.getWebStatDataLs)();if(h||!0===r&&!f()&&e.length>i.emptyStatsDataLs.length)return(0,i.setLastSendTime)(),function(e){var t=window.vk.wsTransport+"/web-stats/"+(window.vk.statsMeta.st?"s":"p"),n=e.length>s.MAX_BODY_SIZE,r=n?(0,d.getMaximumWebStats)(e):e,o=!1;if(!r)return m(),(0,i.clearLsData)();var a=new XMLHttpRequest;a.withCredentials=t.includes("tau."+(0,c.getHostName)()),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var t=Date.now();a.status<500&&(n&&200===a.status?Object.keys((0,i.getEmptyStatsData)()).forEach((function(e){return(0,l.pullFromWebStats)(e,r)})):(0,i.clearLsData)(),p=0,o=!0),(n||400===a.status)&&(0,s.logProcessingTime)(Date.now()-t,(n?"prune":"clean")+(400===a.status?"-fail":""),(e.length>>>20)+"M "+(r.length>>>20)+"M"),m(),v()}},a.onerror=function(){return!o&&(0,i.clearLsData)()},a.open("POST",t,!0),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.send((0,u.pruneRequestFromStuckErrors)((0,s.appendStatsMeta)(++p,r)))}(e);clearTimeout(Number(r)),m(),v()}),(0,o.__assign)((0,o.__assign)({},t),{force:h})))}},228200:(e,t,n)=>{"use strict";n.d(t,{getMaximumWebStats:()=>a});var r=n(570655),o=n(743672),i=n(645611),a=function(e){var t=Date.now(),n=function(e){return"{"+(null==e?void 0:e.map((function(e){var t=(0,r.__read)(e,2);return'"'+t[0]+'":'+t[1]})).join(","))+"}"},a=(0,r.__read)(Object.keys((0,o.getEmptyStatsData)()).reduce((function(t,n){var i=(0,o.getWebStatsStringValue)(n,e);return"[]"===i?t:(0,r.__spreadArray)((0,r.__spreadArray)([],(0,r.__read)(t)),[[n,i]])}),[]).sort((function(e,t){var n=(0,r.__read)(e,2)[1];return(0,r.__read)(t,2)[1].length-n.length})).reduce((function(e,t){var o=(0,r.__read)(e,2),a=o[0],s=o[1],c=(0,r.__read)(t,2),l=c[0],u=c[1],d=[[l,u]];return u.length+n(a).length<i.MAX_BODY_SIZE?[a.concat(d),s]:[a,s.concat(d)]}),[[],[]]),2),s=a[0],c=a[1],l=n(s);if((0,i.logProcessingTime)(Date.now()-t,"chunk"),Date.now()-t<500&&c[0]&&l.length<.1*i.MAX_BODY_SIZE){var u=Date.now();try{var d=function(e,t){var n=(0,r.__read)(t,2),o=n[0],a=n[1],s='{"'+o+'":['+JSON.parse(a).reduce((function(t,n,r){return t.length<i.MAX_BODY_SIZE-e.length?t+(0===r?"":",")+JSON.stringify(n):t}),"")+"]}";return"{}"===e?s:(0,i.concatJSONS)(e,s)||e}(l,c.reverse()[0]);return(0,i.logProcessingTime)(Date.now()-u,"batch"),d}catch(e){return(0,i.logProcessingTime)(Date.now()-u,"batch-fail"),""}}return l}},171516:(e,t,n)=>{"use strict";n.d(t,{saveJsErrorLogs:()=>r.saveJsErrorLogs,saveStatlogEvents:()=>r.saveStatlogEvents,saveNetworkStats:()=>r.saveNetworkStats,saveCustomStats:()=>r.saveCustomStats,saveProductionStats:()=>r.saveProductionStats});var r=n(862110)},645611:(e,t,n)=>{"use strict";n.d(t,{MAX_BODY_SIZE:()=>s,concatJSONS:()=>l,appendStatsMeta:()=>u,makeWebStatsRequest:()=>d,logProcessingTime:()=>_});var r=n(570655),o=n(479957),i=n(678276),a=n(961540),s=1.8*Math.pow(10,6),c=function(e){return e.startsWith("{")&&e.endsWith("}")},l=function(e,t){return[e,t].every(c)?e.slice(0,-1)+","+t.substring(1):"{}"},u=function(e,t){var n=window.vk,o=n.id,i=n.statsMeta,a=i.st,s=i.platform,u=(0,r.__rest)(i,["st","platform"]);return l(JSON.stringify({id:o,st:a,platform:s,attempt:e,signTime:u.time,sign:u.hash}),c(t)?t:"{}")},d=function(e,t){return e=e||window.vk.wsTransport+"/web-stats/"+(window.vk.statsMeta.st?"s":"p"),new Promise((function(n,r){var o=new XMLHttpRequest;o.open("POST",e),e.includes("tau."+(0,a.getHostName)())&&(o.withCredentials=!0),o.onload=function(){return this.status>=200&&this.status<300?n(o.response):r({status:this.status,statusText:o.statusText})},o.onerror=function(){return r({status:this.status,statusText:o.statusText})},o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.send((0,i.pruneRequestFromStuckErrors)("string"==typeof t?t:JSON.stringify(t)))}))};function _(e,t,n){(0,o.statlogsValueEvent)("web_stats_batching_time",e,window.vk.statsMeta.platform,t,n)}},862110:(e,t,n)=>{"use strict";n.d(t,{pullFromWebStats:()=>u,saveJsErrorLogs:()=>_,saveStatlogEvents:()=>p,saveProductionStats:()=>h,saveNetworkStats:()=>f,saveCustomStats:()=>m,saveStoryViewBaseStats:()=>v,saveStoryViewStats:()=>g,saveWebPerfStats:()=>y});var r=n(570655),o=n(743672),i=n(950455),a=n(155695),s=n(19331),c=n(404291),l=n(522683),u=function(e,t){var n=(0,o.getWebStatsStringValue)(e,t);if("[]"!==n){var r=(0,o.getWebStatDataLs)().replace(n.slice(1,-1),"").replace(/\[\,/,"[");(0,o.writeLocked)((function(){return l.vkLocalStorage.setItem(o.lsDataKey,r)}))}},d=function(e,t,n,r){if((0,s.partConfigEnabled)("batchify_web_stats")){var u=function(e,t){var n=(0,o.getWebStatsStringValue)(e);return(0,o.getWebStatDataLs)().replace('"'+e+'":'+n,'"'+e+'":'+n.replace(/]$/,("[]"===n?"":",")+JSON.stringify(t)+"]"))}(t,n);(0,o.writeLocked)((function(){return l.vkLocalStorage.setItem(o.lsDataKey,u)})),(0,c.saveStats)(u,r)}else(0,o.writeLocked)((function(){var e=(0,o.fetchDataFromLs)().webStatsData;e[t].push(n),(0,i.saveStats)(e)}));(0,a.logWebStatsEvent)(e,n)},_=function(e){return d("saveJsErrorLogs","jsErrorLogs",e)},p=function(e){var t=e.name,n=e.value,o=e.keys,i=void 0===o?[]:o,a=(0,r.__spreadArray)([Math.round(Number(Date.now())/1e3),t,n],(0,r.__read)(i));return(0,s.partConfigEnabled)("web_stats_transport_debugger")&&console.log("Data was transformed!"),d("saveStatlogEvents","statlogEvents",a)},h=function(e,t){return d("saveProductionStats","productionStats",e,t)},f=function(e){return d("saveNetworkStats","networkStats",e)},m=function(e){return d("saveCustomStats","customStats",e)},v=function(e){return d("saveStoryViewStats","storyViewStats",e)},g=function(e){return v(e)},y=function(e){return d("saveWebPerfStats","webPerfStats",e)}},155695:(e,t,n)=>{"use strict";n.d(t,{logWebStatsEvent:()=>o});var r=n(19331);function o(e,t){(0,r.partConfigEnabled)("web_stats_transport_debugger")&&console.log("[new transport debug] "+e,t)}},743672:(e,t,n)=>{"use strict";n.d(t,{lsDataKey:()=>a,getEmptyStatsData:()=>l,emptyStatsDataLs:()=>u,writeLocked:()=>d,getWebStatDataLs:()=>_,serializeDataToLs:()=>p,getWebStatsStringValue:()=>h,fetchDataFromLs:()=>f,clearLsData:()=>m,setLastSendTime:()=>v,getLastSendTime:()=>g,getWebStatsItemsCount:()=>y});var r=n(522683),o=n(155695),i=(0,n(961540).isMvk)()?"mvk":"web",a="XHR_STATS_TRANSPORT_DATA_"+i,s="XHR_STATS_TRANSPORT_META_"+i,c="XHR_STATS_TRANSPORT_DATA_LOCK_"+i,l=function(){return{jsErrorLogs:[],statlogEvents:[],productionStats:[],storyViewStats:[],networkStats:[],customStats:[],webPerfStats:[]}},u=JSON.stringify(l());function d(e){if("locked"!==r.vkSessionStorage.getItem(c)){(0,o.logWebStatsEvent)("writeLocked","lock"),r.vkSessionStorage.setItem(c,"locked");try{e()}catch(e){}return(0,o.logWebStatsEvent)("writeLocked","free"),void r.vkSessionStorage.setItem(c,"free")}setTimeout((function(){return d(e)}),100)}var _=function(){return r.vkLocalStorage.getItem(a)||u},p=function(e){return r.vkLocalStorage.setItem(a,JSON.stringify(e))},h=function(e,t){var n;void 0===t&&(t=_());var r,o=Object.keys(l()).filter((function(t){return t!==e})).join("|"),i=(null===(n=null==t?void 0:t.match(new RegExp('"'+e+'":(\\[.*?\\])(?:,"('+o+')":\\[|}$)')))||void 0===n?void 0:n[1])||"";return(r=i).startsWith("[")&&r.endsWith("]")?i:"[]"};function f(){var e,t=!0;try{var n=_();if(!n)throw new Error("empty data");e=l();var r=JSON.parse(n);Object.keys(e).forEach((function(n){Array.isArray(r[n])&&(t=!1,e[n]=r[n])}))}catch(t){e=l()}return{webStatsData:e,isEmpty:t}}function m(e){e&&(0,o.logWebStatsEvent)("WebStats cleared. "+(e?"Reason: LS is broken.":""),e),d((function(){return r.vkLocalStorage.setItem(a,"")}))}function v(e){void 0===e&&(e=Number(new Date)),r.vkSessionStorage.setItem(s,e.toString())}function g(){return parseInt(""+(r.vkSessionStorage.getItem(s)||0))}function y(e){return Object.values(e).reduce((function(e,t){return e+=t.length}),0)}},950455:(e,t,n)=>{"use strict";n.d(t,{saveStats:()=>p});var r,o=n(570655),i=n(743672),a=n(155695),s=n(19331),c=n(645611),l=6e4,u=12e4,d=1;function _(e){return!!(0,s.partConfigEnabled)("web_stats_send_on_events_limit")&&(1===d&&(0,i.getWebStatsItemsCount)(e)>300)}function p(e){var t=+new Date,n=(0,i.getLastSendTime)();0===n&&(n=t,(0,i.setLastSendTime)(n));var o,c=t-n,d=c/1e3,p=_(e);(0,a.logWebStatsEvent)("saveStats",{nowMs:t,lastTransferTimeMs:n,timePassed:d+"s",statsData:e}),(0,s.partConfigEnabled)("web_stats_debounce")?((0,i.serializeDataToLs)(e),o=function(e,t){return t?0:0===e||e>l?3e3:u}(c,p),window.clearTimeout(r),r=window.setTimeout((function(){return(0,i.writeLocked)((function(){var e=(0,i.fetchDataFromLs)().webStatsData,t=+new Date;f(e),(0,i.clearLsData)(),(0,i.setLastSendTime)(t)}))}),o)):c>l||p?(f(e),(0,i.clearLsData)(),(0,i.setLastSendTime)(t)):((0,i.serializeDataToLs)(e),window.setTimeout(h,u))}function h(){(0,i.writeLocked)((function(){var e=(0,i.fetchDataFromLs)(),t=e.webStatsData;e.isEmpty||p(t)}))}function f(e){(0,a.logWebStatsEvent)("send",e);var t=window.vk,n=t.id,r=t.wsTransport,s=t.statsMeta,l=r+(window.vk&&window.vk.statsMeta&&window.vk.statsMeta.st?"/web-stats/s":"/web-stats/p"),u=(0,o.__assign)((0,o.__assign)({},e),{id:n,st:s.st,platform:s.platform,signTime:s.time,sign:s.hash,attempt:d});(0,c.makeWebStatsRequest)(l,u).then((function(e){(0,a.logWebStatsEvent)("sendStats success",e),d=1})).catch((function(t){return d++,(0,i.writeLocked)((function(){(0,a.logWebStatsEvent)("sendStats try",d),p(e)})),(0,a.logWebStatsEvent)("sendStats error",t),!0})),(0,i.setLastSendTime)(+new Date)}},749410:(e,t,n)=>{"use strict";n.d(t,{WEB_VITALS_RAND_ENABLED_FOR:()=>c,NAV_TIME_RAND_ENABLED_FOR:()=>l,WEB_VITALS_THROTTLE_FOR:()=>u,NAV_TIME_THROTTLE_FOR:()=>d,MAX_THROTTLE_PERIOD:()=>_,IGNORED_MODULES:()=>p,getWebVitalsTimeOf:()=>h});var r=n(570655),o=(0,n(961540).isMvk)(),i=Object.entries((0,r.__assign)({apps:.5,game:.5,mini_app:.5,audio:.2,board:.5,feed:o?.01:.005,friends:.3,groups_list:.3,photos:.3,video:.2,wall:.1},o?{activation:.1,article_webview:.1,group:.05,"i-oauth":.05,join:.25,like:.5,login:.2,mail:.02,menu:.05,notifications:.3,recommended:.3,search:.4}:{ads:.5,groups:.1,im:.025,public:.07})).reduce((function(e,t){var n,o,i=(0,r.__read)(t,2),a=i[0],s=i[1];return{RAND_ENABLED_OF:(0,r.__assign)((0,r.__assign)({},e.RAND_ENABLED_OF),(n={},n[a]=s,n)),THROTTLE_PERIOD_OF:(0,r.__assign)((0,r.__assign)({},e.THROTTLE_PERIOD_OF),(o={},o[a]=288e5,o))}}),{RAND_ENABLED_OF:{},THROTTLE_PERIOD_OF:{}}),a=i.RAND_ENABLED_OF,s=i.THROTTLE_PERIOD_OF,c=(0,r.__assign)((0,r.__assign)((0,r.__assign)({},a),o?{payments:.2}:{}),{pages:o?.02:.5,profile:o?.03:.01}),l=(0,r.__assign)((0,r.__assign)((0,r.__assign)({},a),o?{index:.05}:{groups_list:.15}),{audio:.15,bookmarks:.3,feed:.15,friends:.15,profile:.02,video:o?.01:.2}),u=(0,r.__assign)({},s),d=(0,r.__assign)({},s),_=Math.max.apply(Math,(0,r.__spreadArray)([],(0,r.__read)(Object.values(s)))),p=["app","docs","wall_donut","unknown","invite","wall_archive","support","helpdesk","abuse","noSpam","sf"],h=function(e,t){var n="poor"===e;return"perfect"===e&&"CLS"!==t?16:{FID:n?300:100,LCP:n?4e3:2500,CLS:n?.25:.1,TTFB:n?600:200,FCP:n?3e3:1800}[t]}},274181:(e,t,n)=>{"use strict";n.d(t,{metricOnCoolDown:()=>_,updateMetricTimestamp:()=>p,pruneMetricTimestamps:()=>h,shouldBeMeasured:()=>f});var r=n(522683),o=n(749410),i=n(19331),a=n(961540),s=n(649846),c=(0,a.isMvk)()?"MVK":"WEB",l="PERF_METRICS_TIMESTAMPS_"+c,u=s.navigationStat.getModule,d=function(){var e={};try{e=JSON.parse(r.vkLocalStorage.getItem(l)||"{}")}catch(e){}return e},_=function(e,t){var n,r=u();return((null===(n=d()[r])||void 0===n?void 0:n[t])||0)+e[r]>=Date.now()},p=function(e){var t=u(),n=Date.now(),o=d();o[t]||(o[t]={}),o[t][e]=n,o.updatedAt=n,r.vkLocalStorage.setItem(l,JSON.stringify(o))},h=function(){return window.requestIdleCallback((function(){var e,t,n=["WEB_VITALS_TIMESTAMPS_"+c,"NAV_DURATION_TIMESTAMPS_"+c],i=Number(null===(t=null===(e=r.vkLocalStorage.getItem(l))||void 0===e?void 0:e.match(/"updatedAt":([0-9]+)/))||void 0===t?void 0:t[1]);!isNaN(i)&&Date.now()>i+o.MAX_THROTTLE_PERIOD&&(r.vkLocalStorage.removeItem(l),n.forEach((function(e){return r.vkLocalStorage.removeItem(e)})))}),{timeout:5e3})},f=function(e){var t=u(),n=e[t]||1;return!o.IGNORED_MODULES.includes(t)&&(0,i.randEnabled)(n)}},649846:(e,t,n)=>{"use strict";n.d(t,{NavigationProductionStatEventTypes:()=>r.NavigationProductionStatEventTypes,navigationStat:()=>i});var r=n(214547),o=new r.ProductionStatCollector,i=new r.NavigationStatCollector(o)},208055:(e,t,n)=>{"use strict";n.d(t,{AudioNetworkStatCollector:()=>o});var r=n(962148),o=function(){function e(e){this.networkStatCollector=e}return e.prototype.logEvent=function(e,t,n){var o,i=((o={network_type:t,network_effective_type:n,type:r.NetworkStatEventTypes.TYPE_NETWORK_AUDIO_ITEM})[r.NetworkStatEventTypes.TYPE_NETWORK_AUDIO_ITEM]=e,o);this.networkStatCollector.logEvent(i)},e}()},830648:(e,t,n)=>{"use strict";n.d(t,{NetworkStatCollector:()=>r.NetworkStatCollector,NetworkStatCollectorInstance:()=>r.NetworkStatCollectorInstance,AudioNetworkStatCollector:()=>o.AudioNetworkStatCollector,AudioNetworkType:()=>i.AudioNetworkType});var r=n(639101),o=n(208055),i=n(962148)},816426:(e,t,n)=>{"use strict";n.d(t,{ModuleNavigationStatMarks:()=>c,ModuleNavigationStatCollector:()=>l});var r=n(962148),o=n(760847),i=n(649846),a=n(749410),s=n(274181),c={web2:{PERF_MARK:"__navmark",PERF_MEASURE:"__navmeasure"},mvk:{PERF_MARK:"__navmark_mvk",PERF_MEASURE:"__navmeasure_mvk"}},l=function(){function e(e){this.LS_ALREADY_PRUNED=!1,this.moduleNavigationStatCollector=e}return e.clearPerformanceMeasures=function(e){var t=c[e],n=t.PERF_MARK,r=t.PERF_MEASURE;"performance"in window&&(window.performance.clearMeasures(r),window.performance.clearMarks(n))},e.prototype.logEvent=function(){var t,n,l,u,d,_="mvk"===(null===(l=null===(n=window.vk)||void 0===n?void 0:n.statsMeta)||void 0===l?void 0:l.platform)?"mvk":"web2",p=o.default.getConnectionEffectiveType();try{var h=c[_],f=h.PERF_MARK,m=h.PERF_MEASURE;window.performance.measure(m,f),d=null===(u=window.performance.getEntriesByType("measure").find((function(e){return e.name===m})))||void 0===u?void 0:u.duration}catch(e){}if(e.clearPerformanceMeasures(_),d&&(0,s.shouldBeMeasured)(a.NAV_TIME_RAND_ENABLED_FOR)&&!(0,s.metricOnCoolDown)(a.NAV_TIME_THROTTLE_FOR,e.PERF_METRIC_NAME))return(0,s.updateMetricTimestamp)(e.PERF_METRIC_NAME),this.moduleNavigationStatCollector.logEvent(((t={network_type:"UNKNOWN",network_effective_type:p,type:r.NetworkStatEventTypes.TYPE_MODULE_NAVIGATION_STATS_ITEM})[r.NetworkStatEventTypes.TYPE_MODULE_NAVIGATION_STATS_ITEM]={module:i.navigationStat.getModule(),value:Math.round(d).toString()},t));this.LS_ALREADY_PRUNED||(this.LS_ALREADY_PRUNED=!0,(0,s.pruneMetricTimestamps)())},e.PERF_METRIC_NAME="NAV",e}()},639101:(e,t,n)=>{"use strict";n.d(t,{NetworkStatCollector:()=>i,NetworkStatCollectorInstance:()=>a});var r=n(66433),o=n(171516),i=function(){function e(){}return e.prototype.logEvent=function(e){e.type&&e[e.type]?(0,o.saveNetworkStats)(e):(0,r.logError)(new Error("NetworkStatCollector: invalid event."))},e}(),a=new i},962148:(e,t,n)=>{"use strict";var r,o;n.d(t,{NetworkStatEventTypes:()=>r,AudioNetworkType:()=>o}),function(e){e.TYPE_NETWORK_AUDIO_ITEM="type_network_audio_item",e.TYPE_MODULE_NAVIGATION_STATS_ITEM="type_module_navigation_stats_item"}(r||(r={})),function(e){e.FRAGMENT_LOADED="fragment_loaded",e.FRAGMENT_STALLED="fragment_stalled"}(o||(o={}))},379746:(e,t,n)=>{"use strict";n.d(t,{ActionStatCollector:()=>i});var r=n(570655),o=n(740517),i=function(){function e(e){this.productionStatCollector=e}return e.prototype.logEvent=function(e,t){var n,i=(0,r.__assign)((0,r.__assign)({},this.productionStatCollector.getBaseEvent()),((n={type:o.ProductionStatEventTypes.TYPE_ACTION})[o.ProductionStatEventTypes.TYPE_ACTION]=e,n));this.productionStatCollector.logEvent(i,t)},e}()},920353:(e,t,n)=>{"use strict";n.d(t,{AdMiniAppsEventStatsCollector:()=>i});var r=n(740517),o=n(214547),i=function(){function e(){this.productStatCollector=new o.ProductionStatCollector,this.actionStatCollector=new o.ActionStatCollector(this.productStatCollector)}return e.prototype.logEvent=function(e,t){var n,o={mini_app_id:e,event:t},i=((n={type:r.ActionProductionStatEventTypes.TYPE_AD_MINI_APPS_EVENT_ITEM})[r.ActionProductionStatEventTypes.TYPE_AD_MINI_APPS_EVENT_ITEM]=o,n);this.actionStatCollector.logEvent(i)},e}()},746991:(e,t,n)=>{"use strict";n.d(t,{BridgeEventStatsCollector:()=>i});var r=n(740517),o=n(214547),i=function(){function e(){this.productStatCollector=new o.ProductionStatCollector,this.actionStatCollector=new o.ActionStatCollector(this.productStatCollector)}return e.prototype.logEvent=function(e,t,n,o){var i,a={webview_url:e,mini_app_id:t,event:n,error:o},s=((i={type:r.ActionProductionStatEventTypes.TYPE_BRIDGE_EVENT_ITEM})[r.ActionProductionStatEventTypes.TYPE_BRIDGE_EVENT_ITEM]=a,i);this.actionStatCollector.logEvent(s)},e}()},410067:(e,t,n)=>{"use strict";n.d(t,{EasterEggsItemStatCollector:()=>i});var r=n(740517),o=n(214547),i=function(){function e(){this.productStatCollector=new o.ProductionStatCollector,this.actionStatCollector=new o.ActionStatCollector(this.productStatCollector)}return e.prototype.logEvent=function(e,t,n,o){var i,a={egg_id:e,egg_event_id:t,position_id:n,event_type:o},s=((i={type:r.ActionProductionStatEventTypes.TYPE_EASTER_EGGS_ITEM})[r.ActionProductionStatEventTypes.TYPE_EASTER_EGGS_ITEM]=a,i);this.actionStatCollector.logEvent(s)},e}()},787486:(e,t,n)=>{"use strict";n.d(t,{GamesJsSDKEventStatsCollector:()=>i});var r=n(740517),o=n(214547),i=function(){function e(){this.productStatCollector=new o.ProductionStatCollector,this.actionStatCollector=new o.ActionStatCollector(this.productStatCollector)}return e.prototype.logEvent=function(e,t){var n,o={app_id:e,event_name:t},i=((n={type:r.ActionProductionStatEventTypes.TYPE_GAMES_JS_SDK_ITEM})[r.ActionProductionStatEventTypes.TYPE_GAMES_JS_SDK_ITEM]=o,n);this.actionStatCollector.logEvent(i)},e}()},124896:(e,t,n)=>{"use strict";n.d(t,{MarketingTransitionItemStatCollector:()=>a});var r=n(740517),o=n(214547),i=n(376567),a=function(){function e(){this.productStatCollector=new o.ProductionStatCollector,this.actionStatCollector=new o.ActionStatCollector(this.productStatCollector)}return e.prototype.logEvent=function(e,t,n,o){var a;void 0===o&&(o="");var s={campaign:e,source:n,event:t,unauth_id:(0,i.getCookie)("remixstid")};o&&(s.url=o);var c=((a={type:r.ActionProductionStatEventTypes.TYPE_MARKETING_TRANSITION_ITEM})[r.ActionProductionStatEventTypes.TYPE_MARKETING_TRANSITION_ITEM]=s,a);this.actionStatCollector.logEvent(c)},e}()},230818:(e,t,n)=>{"use strict";n.d(t,{VkConnectNavigationCollector:()=>a});var r=n(570655),o=n(740517),i=n(214547),a=function(){function e(){this.lastNavEventId=0,this.productionStatCollector=new i.ProductionStatCollector}return e.prototype.logEvent=function(e,t){var n,i,a=this.productionStatCollector.getBaseEvent(),s=(0,r.__assign)((0,r.__assign)({},a),((n={screen:"main",prev_nav_id:this.lastNavEventId,prev_event_id:a.prev_id||0,type:o.ProductionStatEventTypes.TYPE_ACTION})[o.ProductionStatEventTypes.TYPE_ACTION]=((i={type:o.ActionProductionStatEventTypes.TYPE_VK_CONNECT_NAVIGATION_ITEM})[o.ActionProductionStatEventTypes.TYPE_VK_CONNECT_NAVIGATION_ITEM]=e,i),n));this.lastNavEventId=s.id,this.productionStatCollector.logEvent(s,t)},e.prototype.logServiceNavigationOpen=function(e){this.logEvent({event_type:o.IVkConnectNavigationItemEventType.SERVICE_NAVIGATION_OPEN,fields:e})},e.prototype.logServiceNavigationClose=function(e){this.logEvent({event_type:o.IVkConnectNavigationItemEventType.SERVICE_NAVIGATION_CLOSE,fields:e})},e.prototype.logServiceNavigationClick=function(e,t,n){this.logEvent({event_type:o.IVkConnectNavigationItemEventType.SERVICE_NAVIGATION_CLICK,fields:[{name:e,str_value:t,int_value:n}]})},e.prototype.logAccountActionsOpen=function(t){var n={event_type:o.IVkConnectNavigationItemEventType.POPUP_OPEN};e.addFlowTypeIfFeatureExists(n,t),this.logEvent(n)},e.prototype.logAccountActionsClose=function(t){var n={event_type:o.IVkConnectNavigationItemEventType.POPUP_CLOSE};e.addFlowTypeIfFeatureExists(n,t),this.logEvent(n)},e.prototype.logAccountActionsEnterLk=function(t,n){void 0===t&&(t="account_actions");var r={event_type:o.IVkConnectNavigationItemEventType.CLICK_ENTER_LK,flow_service:t};e.addFlowTypeIfFeatureExists(r,n),this.logEvent(r)},e.prototype.logAccountActionsVkPay=function(e){void 0===e&&(e="account_actions"),this.logEvent({event_type:o.IVkConnectNavigationItemEventType.CLICK_VK_PAY,flow_service:e})},e.prototype.logAccountActionsVkCombo=function(e){void 0===e&&(e="account_actions"),this.logEvent({event_type:o.IVkConnectNavigationItemEventType.CLICK_VK_COMBO,flow_service:e})},e.addFlowTypeIfFeatureExists=function(e,t){t&&Object.assign(e,{flow_type:t})},e}()},914443:(e,t,n)=>{"use strict";n.d(t,{ClickStatCollector:()=>i});var r=n(570655),o=n(740517),i=function(){function e(e){this.productionStatCollector=e}return e.prototype.logEvent=function(e,t){var n,i=(0,r.__assign)((0,r.__assign)({},this.productionStatCollector.getBaseEvent()),((n={type:o.ProductionStatEventTypes.TYPE_CLICK})[o.ProductionStatEventTypes.TYPE_CLICK]=(0,r.__assign)({item:t},e),n));this.productionStatCollector.logEvent(i)},e}()},271121:(e,t,n)=>{"use strict";n.d(t,{VkAppsActionMenuStatsCollector:()=>i});var r=n(740517),o=n(214547),i=function(){function e(){this.productStatCollector=new o.ProductionStatCollector,this.clickStatCollector=new o.ClickStatCollector(this.productStatCollector)}return e.prototype.logEvent=function(e,t,n){var o,i={type:n},a=((o={type:r.ClickProductionStatEventTypes.TYPE_MINI_APP_ITEM})[r.ClickProductionStatEventTypes.TYPE_MINI_APP_ITEM]=i,o),s={type:t,id:e};this.clickStatCollector.logEvent(a,s)},e}()},309195:(e,t,n)=>{"use strict";var r,o;n.d(t,{DonutActionEventType:()=>r,DonutActionEventScreen:()=>o}),function(e){e.PAYMENT_FORM="payment_form",e.PAYMENT_FORM_CLICK_OFFER="payment_form_click_offer",e.PAYMENT_FORM_CLICK_PAY="payment_form_click_pay",e.PAYMENT_FORM_CLICK_CLOSE="payment_form_click_close",e.PAYMENT_FORM_CHANGE_CLICK_CHANGE="payment_form_change_click_change",e.CLICK_SHOW_MORE="click_show_more",e.WIDGET_VIEW="widget_view",e.DESCRIPTION_VIEW="description_view"}(r||(r={})),function(e){e.PAYMENT_START="payment_start",e.DATA_ACCESS="data_access",e.RESULT_PAYMENT_SUCCESS_OK="result_payment_success_ok",e.RESULT_PAYMENT_SUCCESS_WAITING="result_payment_success_waiting",e.RESULT_PAYMENT_SUCCESS_WAITING_TIMEOUT="result_payment_success_waiting_timeout",e.RESULT_RESUB_SUCCESS_WAITING="result_resub_success_waiting",e.RESULT_RESUB_SUCCESS_WAITING_OK="result_resub_success_waiting_ok",e.RESULT_PAYMENT_UNAVAILABLE="result_payment_unavailable",e.RESULT_PAYMENT_CANCEL="result_payment_cancel",e.RESULT_ERROR="result_error",e.CHANGE_START="change_start",e.RESULT_CHANGE_ERROR="result_change_error",e.RESULT_CHANGE_SUCCESS_OK="result_change_success_ok",e.RESULT_CHANGE_SUCCESS_WAITING="result_change_success_waiting",e.RESULT_CHANGE_SUCCESS_WAITING_TIMEOUT="result_change_success_waiting_timeout",e.RESULT_CHANGE_UNAVAILABLE="result_change_unavailable",e.UNKNOWN="donut_payment_screen_unknown"}(o||(o={}))},214547:(e,t,n)=>{"use strict";n.d(t,{NavigationStatCollector:()=>d.NavigationStatCollector,ProductionStatCollector:()=>_.ProductionStatCollector,ActionStatCollector:()=>p.ActionStatCollector,ClickStatCollector:()=>h.ClickStatCollector,ViewStatCollector:()=>f.ViewStatCollector,RegistrationItemStatCollector:()=>m.RegistrationItemStatCollector,NavigationProductionStatEventTypes:()=>v.NavigationProductionStatEventTypes,RegistrationFieldItemNames:()=>v.RegistrationFieldItemNames,RegistrationItemEventTypes:()=>v.RegistrationItemEventTypes,EventScreens:()=>v.EventScreens,EventFieldValues:()=>v.EventFieldValues,marketingTransitionItemStat:()=>g,easterEggsItemStat:()=>y,bridgeEventItemStat:()=>E,adMiniAppsEventItemStat:()=>w,miniAppsItemStats:()=>b,vkConnectNavigationCollector:()=>C,gamesJsSDKEventStatsCollector:()=>S});var r=n(124896),o=n(746991),i=n(410067),a=n(271121),s=n(210759),c=n(230818),l=n(920353),u=n(787486),d=n(725623),_=n(278964),p=n(379746),h=n(914443),f=n(834404),m=n(924293),v=n(740517),g=new r.MarketingTransitionItemStatCollector,y=new i.EasterEggsItemStatCollector,E=new o.BridgeEventStatsCollector,w=new l.AdMiniAppsEventStatsCollector,b=(new a.VkAppsActionMenuStatsCollector,new s.MiniAppsEventStatsCollector),C=new c.VkConnectNavigationCollector,S=new u.GamesJsSDKEventStatsCollector},725623:(e,t,n)=>{"use strict";n.d(t,{NavigationStatCollector:()=>s});var r=n(570655),o=n(740517),i=n(66433),a=n(19331),s=function(){function e(e){this.ProductionStatCollector=e,this.tabId=this.ProductionStatCollector.getIntId()%128}return e.prototype.logEvent=function(e){var t,n=(0,r.__assign)((0,r.__assign)({},this.ProductionStatCollector.getBaseEvent()),((t={type:o.ProductionStatEventTypes.TYPE_NAVGO})[o.ProductionStatEventTypes.TYPE_NAVGO]=e,t));return this.ProductionStatCollector.logEvent(n),{statEvent:n}},e.prototype.getEventTabOpen=function(e){return{subtype:o.NavigationProductionStatEventTypes.TAB_OPEN,tab_id:this.tabId,screen:e}},e.prototype.getEventMove=function(e,t){var n,r,a=this.lastStatEvents,s=this.lastNavEvents;return a&&s?(s.subtype===o.NavigationProductionStatEventTypes.TAB_OPEN?n=s.screen:(n=s.screen_to,r=s.screen),{prev_navgo_id:a.id,subtype:t,screen:n,screen_to:e,screen_prev:r,prev_navgo_timestamp:a.timestamp,tab_id:this.tabId}):((0,i.logError)(new Error("NavigationStatCollector: previous event not found.")),null)},e.prototype.addStatEvent=function(e,t){if(void 0===t&&(t=o.NavigationProductionStatEventTypes.GO),(0,a.partConfigEnabled)("navigation_timespent")){var n;if(t===o.NavigationProductionStatEventTypes.TAB_OPEN)n=this.getEventTabOpen(e);else{var r=this.getEventMove(e,t);if(!r)return;n=r}var i=this.logEvent(n).statEvent;this.lastStatEvents=i,this.lastNavEvents=n}},e.prototype.getModule=function(){var e,t;return null!==(t=null===(e=window.cur)||void 0===e?void 0:e.module)&&void 0!==t?t:"unknown"},e}()},278964:(e,t,n)=>{"use strict";n.d(t,{ProductionStatCollector:()=>a});var r=n(66433),o=n(22463),i=n(171516),a=function(){function e(){this.DEBUG=!1}return e.prototype.getCurrentTime=function(e){void 0===e&&(e=!0);var t=Date.now().toString(10);return e?t+"000":t},e.prototype.getIntId=function(){return Math.floor(Math.random()*e.MAX_INT32)},e.prototype.logEvent=function(e,t){this.DEBUG&&(0,o.log)(e),e.type&&e[e.type]?((0,i.saveProductionStats)(e,t),this.lastEvent=e):(0,r.logError)(new Error("ProductionStatCollector: invalid event."))},e.prototype.getLastEvent=function(){return this.lastEvent},e.prototype.getBaseEvent=function(){var e;return{id:this.getIntId(),prev_id:null===(e=this.lastEvent)||void 0===e?void 0:e.id,timestamp:this.getCurrentTime(),url:window.location.href}},e.MAX_INT32=2147483647,e}()},924293:(e,t,n)=>{"use strict";n.d(t,{RegistrationItemStatCollector:()=>s});var r=n(570655),o=n(740517),i=n(19331),a=n(376567),s=function(){function e(e){this.actionStatCollector=e,this.fields={}}return e.prototype.logFieldInteraction=function(e,t,n){void 0===n&&(n=!1),[o.RegistrationFieldItemNames.PASSWORD,o.RegistrationFieldItemNames.SMS_CODE,o.RegistrationFieldItemNames.RULES_ACCEPT].includes(e)&&(t=t?"1":"0");var r=n?"0":this.actionStatCollector.productionStatCollector.getCurrentTime(!1),i=this.fields[e];i?(i.value=t,i.end_interaction_time=r):this.fields[e]={name:e,value:t,start_interaction_time:r,end_interaction_time:r}},e.prototype.getFieldInteractions=function(){return Object.values(this.fields)},e.prototype.resetFieldInteractions=function(){var e,t;try{for(var n=(0,r.__values)(Object.getOwnPropertyNames(this.fields)),o=n.next();!o.done;o=n.next()){var i=o.value;delete this.fields[i]}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.logEvent=function(e,t,n,r){var s;if((0,i.partConfigEnabled)("registration_item_stat")){var c={event_type:e,screen:t,unauth_id:(0,a.getCookie)("remixstid"),sid:(0,a.getCookie)("remixnreg_sid")};[o.RegistrationItemEventTypes.SCREEN_PROCEED,o.RegistrationItemEventTypes.SCREEN_SKIP,o.RegistrationItemEventTypes.SCREEN_RETURN,o.RegistrationItemEventTypes.INCORRECT_SMS_CODE].includes(e)&&(c.screen_to=n,c.fields=this.getFieldInteractions(),this.resetFieldInteractions()),e!==o.RegistrationItemEventTypes.SELECT_COUNTRY_DONE&&e!==o.RegistrationItemEventTypes.PROCEED_OTHER_COUNTRY_CODE||!this.fields[o.RegistrationFieldItemNames.SELECT_COUNTRY_NAME]||(c.fields=this.getFieldInteractions().filter((function(e){return e.name===o.RegistrationFieldItemNames.SELECT_COUNTRY_NAME})),delete this.fields[o.RegistrationFieldItemNames.SELECT_COUNTRY_NAME]);var l=((s={type:o.ActionProductionStatEventTypes.TYPE_REGISTRATION_ITEM})[o.ActionProductionStatEventTypes.TYPE_REGISTRATION_ITEM]=c,s);this.actionStatCollector.logEvent(l,r)}},e}()},740517:(e,t,n)=>{"use strict";var r,o,i,a,s,c,l,u,d,_,p,h,f,m,v,g,y,E,w,b,C,S,T,A;n.d(t,{EventScreens:()=>r,EventFieldValues:()=>o,ProductionStatEventTypes:()=>i,NavigationProductionStatEventTypes:()=>a,YoulaEventTypes:()=>s,ActionProductionStatEventTypes:()=>c,ClickProductionStatEventTypes:()=>l,ViewProductionStatEventTypes:()=>u,MarketEventTypes:()=>_,EventItemType:()=>h,RegistrationItemEventTypes:()=>m,RegistrationFieldItemNames:()=>v,MarketingTransitionItemCampaignType:()=>g,MarketingTransitionItemEventType:()=>y,GamesJsSDKEventNames:()=>w,MyGamesCloudItemType:()=>C,AlertInAppType:()=>S,IEasterEggsItemEventType:()=>T,IVkConnectNavigationItemEventType:()=>A}),function(e){e.NOWHERE="nowhere",e.OTHER="other",e.START="start",e.START_BOX="start_box",e.START_PROCEED_AS="start_proceed_as",e.REGISTRATION_COMPLETE="registration_complete",e.REGISTRATION_COUNTRY="registration_country",e.REGISTRATION_PHONE="registration_phone",e.REGISTRATION_PHONE_VERIFY="registration_phone_verify",e.REGISTRATION_PASSWORD="registration_password",e.REGISTRATION_EDUCATION="registration_education",e.REGISTRATION_EMAIL="registration_email",e.REGISTRATION_NAME="registration_name",e.REGISTRATION_INVITE_CONFIRM="registration_invite_confirm",e.REGISTRATION_LIST_FRIENDS_FACEBOOK="registration_list_friends_facebook",e.PHONE_2FA_VERIFY="phone_2fa_verify",e.OAUTH_FB="oauth_fb",e.FACEBOOK_REGISTRATION_FAILED="facebook_registration_failed"}(r||(r={})),function(e){e.REGISTERED_VIA_FB="1"}(o||(o={})),function(e){e.TYPE_NAVGO="type_navgo",e.TYPE_ACTION="type_action",e.TYPE_CLICK="type_click",e.TYPE_VIEW="type_view"}(i||(i={})),function(e){e.GO="go",e.BACK="back",e.TAB_OPEN="tab_open"}(a||(a={})),function(e){e.TYPE_DONUT_DESCRIPTION_NAV_ITEM="type_donut_description_nav_item",e.TYPE_MARKET_NAVGO="type_market_navgo",e.TYPE_YOULA_SNIPPET_NAVGO="type_youla_snippet_navgo",e.TYPE_YOULA_RECOMMENDATION_CAROUSEL_NAVGO="type_youla_recommendation_carousel_navgo",e.TYPE_STUDIO_NAVGO="type_studio_navgo"}(a||(a={})),function(e){e.TYPE_YOULA_SNIPPET_ITEM="type_youla_snippet_item",e.TYPE_YOULA_RECOMMENDATIONS_CAROUSEL="type_youla_recommendation_carousel",e.TYPE_YOULA_TRANSITION_TO_ITEM="type_youla_transition_to_item",e.TYPE_YOULA_IM="type_youla_im"}(s||(s={})),function(e){e.TYPE_REGISTRATION_ITEM="type_registration_item",e.TYPE_MARKETING_TRANSITION_ITEM="type_marketing_transition_item",e.TYPE_DONUT_PAYMENT_ITEM="type_donut_payment_item",e.TYPE_CALL_ITEM="type_voip_call_item",e.TYPE_BRIDGE_EVENT_ITEM="type_bridge_event_item",e.TYPE_AD_MINI_APPS_EVENT_ITEM="type_ad_mini_apps_event_item",e.TYPE_EASTER_EGGS_ITEM="type_easter_eggs_item",e.TYPE_VK_CONNECT_NAVIGATION_ITEM="type_vk_connect_navigation_item",e.TYPE_GAMES_JS_SDK_ITEM="type_games_js_sdk_item"}(c||(c={})),function(e){e.TYPE_MARKET_CLICK="type_market_click",e.TYPE_WORKI_CLICK="type_worki_click",e.TYPE_CATALOG_BANNER_ITEM="type_catalog_banner_item",e.TYPE_MINI_APP_ITEM="type_mini_app_item",e.TYPE_MESSAGING_CONTACT_RECOMMENDATIONS_ITEM="type_messaging_contact_recommendations_item",e.TYPE_STUDIO_PERIOD_SELECT="type_studio_period_select",e.TYPE_QUESTION_ITEM="type_question_item"}(l||(l={})),function(e){e.TYPE_CATALOG_BANNER_ITEM="type_catalog_banner_item",e.TYPE_MARKET_VIEW="type_market_view",e.TYPE_MINI_APPS_VIEW_ITEM="type_mini_app_view_item"}(u||(u={})),function(e){e.MARKETPLACE="marketplace",e.MARKETPLACE_BLOCK="marketplace_block",e.MARKETPLACE_SEARCH="marketplace_search"}(d||(d={})),function(e){e.TYPE_MARKET_ORDERS_ITEM="type_market_orders_item",e.TYPE_MARKET_CARTS_ITEM="type_market_carts_item",e.TYPE_MARKET_GOODS_ITEM="type_market_item",e.TYPE_MARKET_MARKETPLACE_ITEM="type_market_marketplace_item"}(_||(_={})),function(e){e.CATALOG_PROMO_BANNER_VIEWED="catalog_promo_banner_viewed"}(p||(p={})),function(e){e.ARTICLE="article",e.GROUP="group",e.PHOTO="photo",e.POST="post",e.STORY="story",e.USER="user",e.BROWSER="browser",e.NARRATIVE="narrative",e.MINI_APP="mini_app",e.GAME="game",e.VIDEO="video",e.MARKET_ITEM="market_item",e.MARKET_ITEM_ALBUM="market_item_album",e.MARKET_ORDER="market_order",e.CATALOG_BANNER="catalog_banner",e.AUDIO_FULLSCREEN_BANNER="audio_fullscreen_banner",e.WORKI_SNIPPET="worki_snippet",e.MINI_APPS_CATALOG_BANNER_VIEWED="catalog_promo_banner_viewed",e.MINI_APPS_CATALOG_BANNER="catalog_promo_banner",e.TYPE_MESSAGING_CONTACT_RECOMMENDATIONS_ITEM="type_messaging_contact_recommendations_item",e.STUDIO="studio",e.OPEN_CATALOG_ECO_MENU="open_catalog_eco_menu",e.QUESTION="question"}(h||(h={})),function(e){e.SWITCH_ITEM_VARIANT_1="switch_item_variant_1",e.SWITCH_ITEM_VARIANT_2="switch_item_variant_2",e.OPEN_WIKI="open_wiki"}(f||(f={})),function(e){e.SCREEN_PROCEED="screen_proceed",e.SCREEN_SKIP="screen_skip",e.SCREEN_RETURN="screen_return",e.COMMON_SERVER_ERROR="common_server_error",e.RESEND_SMS_CODE="resend_sms_code",e.RESEND_SMS_CODE_FAILED="resend_sms_code_failed",e.INCORRECT_SMS_CODE="incorrect_sms_code",e.INCORRECT_PASSWORD="incorrect_password",e.INCORRECT_NAME="incorrect_name",e.INCORRECT_CAPTCHA="incorrect_captcha",e.INCORRECT_PHONE_NUMBER="incorrect_phone_number",e.INCORRECT_BDAY="incorrect_bday",e.INCORRECT_SEX="incorrect_sex",e.INCORRECT_EMAIL="incorrect_email",e.EXISTING_EMAIL="existing_email",e.INCORRECT_EDUCATION="incorrect_education",e.SUCCESS_2FA="success_2fa",e.LOGIN_TAP="login_tap",e.PASSWORD_TAP="passw_tap",e.START_REG_TAP="start_reg_tap",e.FIRST_COUNTRY="first_country",e.FIRST_EDUCATION="first_education",e.FIRST_EMAIL="first_email",e.FIRST_FRIEND_ASK="first_friend_ask",e.SELECT_COUNTRY="select_country",e.SELECT_COUNTRY_DONE="select_country_done",e.INPUT_NUMBER_INTERACTION="input_number_interaction",e.INPUT_CODE_INTERACTION="input_code_interaction",e.PROCEED_OTHER_COUNTRY_CODE="proceed_other_country_code",e.INPUT_PHONE="input_phone",e.INPUT_EMAIL="input_email"}(m||(m={})),function(e){e.PHONE_COUNTRY="phone_country",e.PHONE_NUMBER="phone_number",e.COUNTRY="country",e.CITY="city",e.EMAIL="email",e.UNIVERSITY="university",e.FACULTY="faculty",e.SCHOOL="school",e.CHAIR="chair",e.YEAR_FROM="year_from",e.YEAR_TO="year_to",e.CLASS="class",e.EDU_FORM="edu_form",e.EDU_STATUS="edu_status",e.GRADUATION="graduation",e.SPECIALIZATION="specialization",e.RULES_ACCEPT="rules_accept",e.SMS_CODE="sms_code",e.FIRST_NAME="first_name",e.LAST_NAME="last_name",e.SEX="sex",e.BDAY="bday",e.PASSWORD="password",e.FACEBOOK_REGISTRATION="facebook_registration",e.FRIEND_ASK="friend_ask",e.VERIFICATION_TYPE="verification_type",e.SELECT_COUNTRY_NAME="select_country_name"}(v||(v={})),function(e){e.UNAUTH_BOTTOM_BANNER="unauth_bottom_banner",e.UNAUTH_ACTION_BOX="unauth_action_box"}(g||(g={})),function(e){e.OPEN="open",e.CLOSE="close",e.CLICK_SIGN_UP="click_sign_up",e.CLICK_SIGN_IN="click_sign_in",e.CLICK_OPEN_IN_APP="click_open_in_app"}(y||(y={})),function(e){e.LIKE="like",e.SHARE="share",e.MORE="more"}(E||(E={})),function(e){e.INIT="games_js_sdk_init"}(w||(w={})),function(e){e.ACTION_MENU_SHARE="action_menu_share",e.ACTION_MENU_ADD_TO_FAVOURITES="action_menu_add_to_favourites",e.ACTION_MENU_REMOVE_FROM_FAVOURITES="action_menu_remove_from_favourites",e.ACTION_MENU_ENABLE_NOTIFICATIONS="action_menu_enable_notifications",e.ACTION_MENU_DISABLE_NOTIFICATIONS="action_menu_disable_notifications",e.ACTION_MENU_ALL_APPS="action_menu_all_apps",e.ACTION_MENU_ALL_GAMES="action_menu_all_games",e.ACTION_MENU_COPY="action_menu_copy",e.ACTION_MENU_DELETE="action_menu_delete"}(b||(b={})),function(e){e.CLICK_GAME_CARD="cloud_games_game_click",e.CLICK_DOWNLOAD_GAME="cloud_games_client_download",e.OPEN_SECTION="cloud_games_section_open"}(C||(C={})),function(e){e.SHOW="notifications_request_sent",e.CLOSE="notifications_request_close",e.TIMEOUT_CLOSE="notifications_request_timeout",e.SETTING_OPEN="notifications_request_settings_open"}(S||(S={})),function(e){e.EGG_SHOW="egg_show",e.POPUP_SHOW="popup_show",e.POPUP_ACTION="popup_action"}(T||(T={})),function(e){e.CLICK_ENTER_LK="click_enter_lk",e.CLICK_VK_PAY="click_vk_pay",e.CLICK_VK_COMBO="click_vk_combo",e.POPUP_OPEN="popup_open",e.POPUP_CLOSE="popup_close",e.SERVICE_NAVIGATION_CLICK="service_navigation_click",e.SERVICE_NAVIGATION_OPEN="service_navigation_open",e.SERVICE_NAVIGATION_CLOSE="service_navigation_close"}(A||(A={}))},834404:(e,t,n)=>{"use strict";n.d(t,{ViewStatCollector:()=>i});var r=n(570655),o=n(740517),i=function(){function e(e){this.productionStatCollector=e}return e.prototype.logEvent=function(e,t){var n,i=(0,r.__assign)((0,r.__assign)({},this.productionStatCollector.getBaseEvent()),((n={type:o.ProductionStatEventTypes.TYPE_VIEW})[o.ProductionStatEventTypes.TYPE_VIEW]=(0,r.__assign)({item:t},e),n));this.productionStatCollector.logEvent(i)},e}()},210759:(e,t,n)=>{"use strict";n.d(t,{MiniAppsEventStatsCollector:()=>a});var r=n(570655),o=n(740517),i=n(214547),a=function(){function e(){this.productStatCollector=new i.ProductionStatCollector,this.viewStatCollector=new i.ViewStatCollector(this.productStatCollector)}return e.prototype.logEvent=function(e,t,n,i){var a;void 0===n&&(n=""),void 0===i&&(i="");var s=(0,r.__assign)((0,r.__assign)({},e),t),c=((a={type:o.ViewProductionStatEventTypes.TYPE_MINI_APPS_VIEW_ITEM})[o.ViewProductionStatEventTypes.TYPE_MINI_APPS_VIEW_ITEM]=s,a.start_view=n,a.end_view=i,a);this.viewStatCollector.logEvent(c,e)},e}()},898966:(e,t,n)=>{"use strict";n.d(t,{QUESTION_MAX_LENGTH:()=>r,QUESTION_MAX_NEW_LINES:()=>o,MY_QUESTIONS_BOX_URL_PARAMETER:()=>i,ASK_QUESTION_BOX_URL_PREFIX:()=>a});var r=80,o=3,i="question",a="ask_question"},451888:(e,t,n)=>{"use strict";n.d(t,{getQuestion:()=>o,getQuestions:()=>i,deleteQuestion:()=>a,restoreQuestion:()=>s,deleteFromAuthor:()=>c,restoreAuthorQuestions:()=>l,sendQuestion:()=>u,getUsers:()=>d,banUser:()=>_,unbanUser:()=>p,reportQuestion:()=>h});var r=n(189798);function o(e){return(0,r.api)("questions.getById",{owner_id:window.vk.id,question_id:e,extended:1,fields:"photo_50,photo_100,first_name_gen,last_name_gen,domain"})}function i(e,t){return void 0===e&&(e=""),void 0===t&&(t=15),(0,r.api)("questions.get",{owner_id:window.vk.id,start_from:e,limit:t,extended:1,fields:"photo_50,photo_100,first_name_gen,last_name_gen,domain"})}function a(e){return(0,r.api)("questions.delete",{owner_id:window.vk.id,question_id:e})}function s(e){return(0,r.api)("questions.restore",{owner_id:window.vk.id,question_id:e})}function c(e){return(0,r.api)("questions.deleteFromAuthor",{owner_id:window.vk.id,question_id:e})}function l(e){return(0,r.api)("questions.restoreFromAuthor",{owner_id:window.vk.id,question_id:e})}function u(e,t,n){return void 0===n&&(n=!1),(0,r.api)("questions.send",{owner_id:e,text:t,is_anonymous:n?1:0})}function d(e){return(0,r.api)("users.get",{user_ids:e.join(","),fields:"photo_50,photo_100,can_ask_anonymous,can_ask_question,first_name_nom,first_name_dat,first_name_gen,last_name_gen,sex"})}function _(e){return(0,r.api)("questions.authorBan",{owner_id:window.vk.id,question_id:e})}function p(e){return(0,r.api)("questions.authorUnBan",{owner_id:window.vk.id,question_id:e})}function h(e){return(0,r.api)("reports.add",{type:"profile_story_question",owner_id:window.vk.id,item_id:e})}},632010:(e,t,n)=>{"use strict";var r;n.d(t,{QuestionsBoxRef:()=>r}),function(e){e.SNIPPET="snippet",e.URL="url",e.STORY="story"}(r||(r={}))},859866:(e,t,n)=>{"use strict";n.d(t,{UnauthorizedSourceType:()=>r});var r={PHOTO:"photo",VIDEO:"video",AUDIO:"audio",COMMENTS:"comments"}},428163:(e,t,n)=>{"use strict";n.d(t,{logout:()=>s,confirmLogout:()=>c});var r=n(189798),o=n(19331),i=n(449162),a=n(426173),s=function(e,t){(0,r.removeLoginCache)(e,t)},c=function(e,t,n,r,c){var l=function(){(0,a.writeLogout)(n,r),s()};(0,o.partConfigEnabled)("logout_confirmation_exp")?(null==e||e.preventDefault(),(0,i.showLogoutConfirmation)(c,(function(){window.nav.go(t.href,e,{hard:!0}),l()}))):l()}},426173:(e,t,n)=>{"use strict";n.d(t,{writeLogout:()=>i});var r=n(479957),o=n(28238),i=function(e,t){if(void 0===e&&(e="unknown"),void 0===t&&(t=""),t){var n=0;try{var i=(0,o.imDbGet)(window.vk.id);Object.entries(i).forEach((function(e){var t=e[0],r=e[1];t.startsWith("draft_")&&(r.txt||r.attaches&&r.attaches.length)&&n++}))}catch(e){}(0,r.statlogsValueEvent)("logout_stat",e,t,n)}}},448632:(e,t,n)=>{"use strict";n.d(t,{handleCaptcha:()=>o});var r=n(654612),o=function(e){return new Promise((function(t){var n=null,o={imgSrc:e.captcha_img,onSubmit:function(e,r){t({captcha_sid:e,captcha_key:r}),n&&n.hide()}};n=(0,r.showCaptchaBox)(e.captcha_sid,n,null,o)}))}},70488:(e,t,n)=>{"use strict";n.d(t,{RegistrationFieldItemNames:()=>r.RegistrationFieldItemNames,RegistrationItemEventTypes:()=>r.RegistrationItemEventTypes,EventScreens:()=>r.EventScreens,EventFieldValues:()=>r.EventFieldValues,registrationItemStat:()=>a});var r=n(214547),o=new r.ProductionStatCollector,i=new r.ActionStatCollector(o),a=new r.RegistrationItemStatCollector(i)},473009:(e,t,n)=>{"use strict";n.d(t,{init:()=>a});var r=n(182804),o=n(70698),i=n(486125),a=function(){var e=(0,o.isTQInitialized)();(0,r.init)(),e||((0,o.tqi)().setHandler("Common/nav_go",(function(e){var t,n;(null===(t=e.payload.event)||void 0===t?void 0:t.target)&&window.nav.go(e.payload.event.target,e.payload.event,JSON.parse((null===(n=e.payload.dataAttrs)||void 0===n?void 0:n.options)||"{}"))}),!1),(0,o.tqi)().setHandler("Common/cur_box_hide",(function(){var e;null===(e=(0,i.curBox)())||void 0===e||e.hide()}),!1))}},483295:(e,t,n)=>{"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=[];return e.forEach((function(e){if(e)switch(typeof e){case"string":n.push(e);break;case"object":Object.keys(e).forEach((function(t){e[t]&&n.push(t)}));break;default:n.push(""+e)}})),n.join(" ")}n.d(t,{classNames:()=>r})},255349:(e,t,n)=>{"use strict";n.d(t,{initVKComboIndexPromo:()=>i});var r=n(182804),o=n(273271);function i(){(0,r.tq)().setInteractiveHandler("IndexComboPromo/register",(function(e){var t=(e.payload.dataAttrs||{}).source;o.Unauthorized.showMoreBox(null,0,t)}))}},267394:(e,t,n)=>{"use strict";n.d(t,{initJoinForm:()=>p});var r=n(570655),o=n(386409),i=n(315544),a=n(486125),s=n(100416),c=n(159121),l=n(570769),u=n(70488),d=n(124041),_="join_form_sex";function p(e,t){var n,p=t.from,h=t.bdateMonths,f=t.bdateYears,m=t.proceedAs,v=t.fbApp,g=t.fbState,y=t.fbLocale,E=t.ref,w=t.values,b=void 0===w?{}:w,C=t.onSignInClick,S=t.onNotNowClick,T=window.cur.options||{},A=T.bday||0,D=T.bmonth||0,P=T.byear||0;n="invite"===E?u.EventScreens.REGISTRATION_INVITE_CONFIRM:m?u.EventScreens.START_PROCEED_AS:"box"===E?u.EventScreens.START_BOX:u.EventScreens.START,window.cur.eventScreen=n,u.registrationItemStat.logEvent(u.RegistrationItemEventTypes.SCREEN_PROCEED,u.EventScreens.NOWHERE,n,{force:!0});var O,I,k,R=e.querySelector(".JoinForm__error"),M=e.querySelector('.JoinForm__textInput[name="first_name"]'),L=e.querySelector('.JoinForm__textInput[name="last_name"]'),x=e.querySelector(".JoinForm__birthdateDayInput"),N=e.querySelector(".JoinForm__birthdateMonthInput"),B=e.querySelector(".JoinForm__birthdateYearInput"),U=e.querySelector(".JoinForm__sex"),F=e.querySelectorAll(".JoinForm__sexRadio"),W=e.querySelector(".JoinForm__birthdate"),V=e.querySelector(".JoinForm__submitButton"),H=e.querySelector(".JoinForm__facebookLogin"),j=e.querySelector(".JoinForm__facebookLogin .FacebookLogin__button"),K=e.querySelector(".JoinForm__signIn"),z=e.querySelector(".JoinForm__notNowLink");if(M&&L&&V){var G=function(){if(!d.FlatButton.isLocked(V)){var e={fname:M.value.trim(),lname:L.value.trim(),bday:O.val(),bmonth:I.val(),byear:k.val(),from:p,frm:1,event_screen:n};(0,i.isVisible)(U)&&(e.sex=Number((0,o.radioval)(_))||0),window.tooltips&&window.tooltips.hideAll();var t=function(e,t){e&&t&&window.Index.showRegTT(e,t)};R&&(R.innerHTML=""),window.ajax.post("join.php?act=start",e,{onDone:function(e,n){switch(e){case"first_name":return t(M,n),void(0,o.notaBene)(M);case"last_name":return t(L,n),void(0,o.notaBene)(L);case"sex_row":return(0,i.show)(U),void t(U,n);case"birthdate_row":return void t(W,n)}n&&(0,c.showMsg)(R,n,"error",!0)},showProgress:function(){return d.FlatButton.lock(V)},hideProgress:function(){return d.FlatButton.unlock(V)}})}},q=function(){var e=Number(O.val())||0,t=Number(I.val())||0,n=Number(k.val())||0,r=new Date(0);e&&r.setDate(e),t&&r.setMonth(t),n&&r.setFullYear(n),u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.BDAY,r.getTime().toString())},Y=function(){var e=window.cur;e.isJoinFieldDirty||(u.registrationItemStat.logEvent(u.RegistrationItemEventTypes.START_REG_TAP,e.eventScreen,void 0,{force:!0}),e.isJoinFieldDirty=!0)};if(u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.FIRST_NAME,M.value,!0),M.addEventListener("keyup",(function(){Y(),u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.FIRST_NAME,M.value)})),u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.LAST_NAME,L.value,!0),L.addEventListener("keyup",(function(){Y(),u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.LAST_NAME,L.value)})),[M,L].forEach((function(e){(0,s.placeholderInit)(e),e.addEventListener("keydown",(function(e){10!==e.keyCode&&13!==e.keyCode||G()}))})),"index"!==E&&requestAnimationFrame((function(){return(0,i.elfocus)(M)})),u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.BDAY,"",!0),O=new window.Dropdown(x,(0,l.generateDays)(P,D),{big_text:!0,multiselect:!1,zeroPlaceholder:!0,selectedItems:A,onChange:function(){Y(),q()}}),I=new window.Dropdown(N,h,{big_text:!0,multiselect:!1,zeroPlaceholder:!0,selectedItems:D,onChange:function(e){Y(),q(),(0,l.updateDayDropdown)(k.val(),e,O,A)}}),k=new window.Dropdown(B,f,{big_text:!0,multiselect:!1,zeroPlaceholder:!0,selectedItems:P,onChange:function(e){Y(),q(),(0,l.updateDayDropdown)(e,I.val(),O,A)}}),window.radioBtns.join_form_sex={els:(0,r.__spreadArray)([],(0,r.__read)(F)),val:0},u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.SEX,Number((0,o.radioval)(_)).toString(),!0),F.forEach((function(e){e.addEventListener("click",(function(){var t=Number(e.dataset.sex);(0,o.radiobtn)(e,t,_),Y(),u.registrationItemStat.logFieldInteraction(u.RegistrationFieldItemNames.SEX,t.toString())}))})),void 0!==b.sex){var $=b.sex,X=e.querySelector('.JoinForm__sexRadio[data-sex="'+$+'"]');X&&X.click()}if(V.addEventListener("click",(function(e){e.preventDefault(),G()})),v){var Q=window.cur;Q.fbApp=v,Q.fbState=g,Q.fbLocale=y,window.Index.fbCheck(v,"",H)}null==j||j.addEventListener("click",(function(e){e.preventDefault(),window.Index.fbJoin("",j)})),K&&C&&K.addEventListener("click",C),z&&S&&z.addEventListener("click",S);var J=(0,a.curBox)();J&&J.setOptions({onClean:function(){O&&O.destroy(),I&&I.destroy(),k&&k.destroy()}}),window.stManager.add([window.jsc("web/tooltips.js"),"tooltips.css"]).catch((function(){}))}}},559367:(e,t,n)=>{"use strict";n.d(t,{initJoinVKConnectButton:()=>h,initJoinVKConnectForm:()=>f,initVkIdForm:()=>m});var r=n(988882),o=n(214547),i=n(70488),a=n(386409),s=n(124041),c=n(100416),l=n(41650),u=7913379,d=o.EventScreens.START;function _(e){var t=window.vk.apiConfigDomains,n=t.loginDomain,o=t.connectDomain;r.Config.init({appId:u,loginDomain:n,connectDomain:o,appSettings:{external_device_id:e,vkc_auth_action:"registration",promo:"registration"}})}function p(e){e&&(d=o.EventScreens.START_PROCEED_AS),window.cur.eventScreen=d,i.registrationItemStat.logEvent(o.RegistrationItemEventTypes.SCREEN_PROCEED,o.EventScreens.NOWHERE,d,{force:!0})}function h(e,t){var n=t.proceedAs;_(t.unauthId),p(n);var o=e.querySelector(".JoinForm__connectButton");if(o){o.addEventListener("click",(function(e){var t;e.preventDefault(),t=location.protocol+"//"+location.host+"/join",r.Connect.redirectAuth({url:t})}))}}function f(e,t){var n=t.proceedAs,u=t.unauthId,h=t.phonePrefix,f=t.hash,m=t.fbApp,v=t.fbState,g=t.fbLocale;_(u),p(n);var y=e.querySelector('.JoinForm__textInput[name="phone"]'),E=e.querySelector(".JoinForm__connectButton"),w=e.querySelector(".JoinForm__connectError"),b=e.querySelector(".JoinForm__form"),C=e.querySelector(".JoinForm__facebookLogin"),S=e.querySelector(".JoinForm__facebookLogin .FacebookLogin__button"),T=!1;if(y&&E&&w&&b){var A=function(e){(0,a.notaBene)(y),w&&e&&(w.innerHTML=e),i.registrationItemStat.logEvent(o.RegistrationItemEventTypes.INCORRECT_PHONE_NUMBER,d,void 0,{force:!0})},D=function(){s.FlatButton.isLocked(E)||(!function(e){var t=String(e).replace(/[^0-9]/g,"").length;return t>=10&&t<=13}(y.value.trim().replace(" ",""))?A((0,l.getLang)("index_error_bad_phone")):function(e,t,n){var o=e.hash;window.ajax.post("join.php?act=connect",e,{onDone:function(e,i){if("error"===e)return A((0,l.getLang)("index_error_bad_phone")),void(0,a.notaBene)(n);s.FlatButton.lock(t);var c={url:location.protocol+"//"+location.host+"/join",action:{name:"registration_with_phone",token:i,params:{csrf_hash:o}}};r.Connect.redirectAuth(c)},showProgress:function(){return s.FlatButton.lock(t)},hideProgress:function(){return s.FlatButton.unlock(t)}})}({phone:y.value.trim(),hash:f},E,y))};if((0,c.placeholderInit)(y),y.value=h,y.addEventListener("keyup",(function(e){"Enter"!==e.key&&(w&&w.innerHTML&&(w.innerHTML=""),T||(i.registrationItemStat.logEvent(o.RegistrationItemEventTypes.START_REG_TAP,d,void 0,{force:!0}),T=!0))})),b.addEventListener("submit",(function(e){e.preventDefault(),D()})),E.addEventListener("click",(function(e){e.preventDefault(),D()})),m){var P=window.cur;P.fbApp=m,P.fbState=v,P.fbLocale=g,window.Index.fbCheck(m,"",C)}null==S||S.addEventListener("click",(function(e){e.preventDefault(),window.Index.fbJoin("",S)}))}}function m(e,t){var n;!function(){var e=window.vk.apiConfigDomains,t=e.loginDomain,n=e.connectDomain;r.Config.init({appId:u,loginDomain:t,connectDomain:n})}(),t&&p(null!==(n=null==t?void 0:t.proceedAs)&&void 0!==n&&n);var o=e.querySelector(".VkIdForm__signInButton"),i=e.querySelector(".VkIdForm__signUpButton");if(o&&i){o.addEventListener("click",(function(e){var n,o;e.preventDefault(),n=location.protocol+"//"+location.host,o={url:(null==t?void 0:t.toFeed)?n+"/feed":n+"/login"+location.search,action:{name:"no_password_flow",params:{type:"sign_in"}}},r.Connect.redirectAuth(o)})),i.addEventListener("click",(function(e){var t;e.preventDefault(),t={url:location.protocol+"//"+location.host+"/join"+location.search,action:{name:"no_password_flow",params:{type:"sign_up"}}},r.Connect.redirectAuth(t)}))}}},570769:(e,t,n)=>{"use strict";n.d(t,{generateDays:()=>i,updateDayDropdown:()=>a});var r=n(659397),o=n(786067);function i(e,t){for(var n=[[0,(0,o.getLang)("index_sel_bday")]],i=(0,r.getLastDayOfMonth)(e,t),a=1;a<=i;++a)n.push([a,String(a)]);return n}function a(e,t,n,o){Number(n.val())>(0,r.getLastDayOfMonth)(e,t)&&n.clear(),n.setData(i(e,t).slice(Number(o)?1:0))}},19834:(e,t,n)=>{"use strict";n.d(t,{replaceExtraHandler:()=>s,_handleResponseExtraPayloads:()=>c});var r=n(469687),o=n(761508),i=n(66433),a=(0,r.makeSharedState)("ajax-extra-handlers",(function(){return new o.default}),{}),s=function(e,t){return a().removeAllListeners(e),function(e,t){return a().addListener(e,t),function(){a().removeListener(e,t)}}(e,t)},c=function(e){var t;null!==(t=e)&&"object"==typeof t&&Object.keys(e).forEach((function(t){try{r=t,o=e[t],a().emit(r,o)}catch(e){var n={message:"Extra response error",data:{extraKey:t}};(0,i.logError)(e,{environment:"ajax_request",breadcrumb:n}),console.error(e)}var r,o}))}},553429:(e,t,n)=>{"use strict";n.d(t,{subscribeOnModuleEvaluated:()=>i,unsubscribeOnModuleEvaluated:()=>a,triggerSubscribersOnModuleEvaluated:()=>s});var r=[],o=[];function i(e,t){void 0===t&&(t=!1),"function"==typeof e&&(t?o.push(e):r.push(e))}function a(e){var t=r.indexOf(e),n=o.indexOf(e);t>=0&&r.splice(t,1),n>=0&&o.splice(n,1)}function s(){r.forEach((function(e){return e()})),o.forEach((function(e){return e()})),o.splice(0,o.length)}},703797:(e,t,n)=>{"use strict";function r(){return window.vk.loginDomain}n.d(t,{getLoginDomain:()=>r})},41650:(e,t,n)=>{"use strict";n.d(t,{getLang:()=>a,default:()=>s});var r=n(495283),o=n(786067),i={};function a(e,t,n){void 0===t&&(t=!1);var a="number"==typeof t,s=t||a,c=e+(s?".raw":"");if(void 0===i[c]){var l=s?(0,o.getLang)(e,"raw"):(0,o.getLang)(e);"string"==typeof l?i[c]=(0,r.decodeHTMLEntities)(l):Array.isArray(l)?i[c]=l.map(r.decodeHTMLEntities):i[c]="object"==typeof l&&null!==l?Object.keys(l).reduce((function(e,t){return e[t]=(0,r.decodeHTMLEntities)(l[t]),e}),{}):l}if(a){var u=t;return(0,o.langNumeric)(u,i[c],n)}return i[c]||""}const s={getLang:a}},712439:(e,t,n)=>{"use strict";n.d(t,{default:()=>c,unpackStore:()=>l});var r=n(609720),o=n(968958),i=n(26330),a=n(695724);function s(e,t){if(!t)return i.default.get(e);i.default.set(e,t)}function c(e,t){void 0===e&&(e={}),void 0===t&&(t={});var n=(0,r.debounce)(s,300),c=(0,a.extend)({},e),l=[],u=[];return t.store&&(c=i.default.get(t.key)||c),{get:function(){return c},set:function(e){var r=this,i=(0,o.isWeirdLogging)()?function(e){try{var t={};return Error.captureStackTrace(t,e),t.stack}catch(e){return""}}(this.set):null;return e(c).then((function(e){return c=e,t.store&&n(t.key,e),r.emit(),r})).catch((function(e){return(0,o.imWeirdCatch)("store_set_catch",e,{stack:i})}))},setState:function(e){var t=this;return this.set((function(n){return n=(0,a.extend)(n,e),t.emit(),Promise.resolve(n)}))},stash:function(){l.push(c),c=(0,a.extend)({},e),this.emit()},reset:function(){c=(0,a.extend)({},e),this.emit()},unmount:function(){c={},e=!1,u=[]},pop:function(){l.length>0&&(c=l.pop(),this.emit())},emit:function(){var e=this;u.length>0&&u.forEach((function(t){return t(e)}))},subscribe:function(e){u.includes(e)||u.push(e)},unsubscribe:function(e){u=u.filter((function(t){return t!==e}))},mutate:function(e){e(c),t.store&&n(t.key,c),this.emit()}}}function l(e){return function(e){return!!e.get}(e)?e.get():e}},528958:(e,t,n)=>{"use strict";n.d(t,{LoginBoxForm:()=>s});var r=n(100416),o=n(386409),i=n(654612),a=n(124041),s=function(){function e(e){this.rootEl=e,this.init()}return e.prototype.init=function(){var e=this.rootEl,t=e.querySelector(".LoginBox__form");if(t){var n=e.querySelector(".LoginBox__formExpire"),s=e.querySelector(".LoginBox__buttonSignIn"),c=e.querySelector(".LoginBox__buttonSignUp"),l=e.querySelector('[name="email"]'),u=e.querySelector('[name="pass"]'),d=e.querySelector('[name="ul"]');s&&(l&&(0,r.placeholderInit)(l),u&&(0,r.placeholderInit)(u),null==n||n.addEventListener("click",(function(e){e.preventDefault(),(0,o.checkbox)(n)})),u&&u.addEventListener("input",(function(){t.classList.toggle("LoginBox--showExpire",u.value.trim().length>0)})),c&&(c.onclick=function(){return(0,i.showBox)("join.php",{act:"box",from:window.nav.strLoc}),!1}),t.onsubmit=function(){if(a.FlatButton.isLocked(s))return!1;var e=window.submitQuickLoginForm;if(!e)return!0;var t=l?l.value.trim():"",r=u?u.value.trim():"",i=Number((0,o.isChecked)(n));if(l&&!t)return(0,o.notaBene)(l),!1;if(!r)return(0,o.notaBene)(u),!1;var c={expire_input:i};return d&&d.value&&(c.ul=d.value),e(t,r,{prg:"login_button",params:c}),a.FlatButton.lock(s),!1},requestAnimationFrame((function(){var e;null===(e=l||u)||void 0===e||e.focus()})))}},e}()},699937:(e,t,n)=>{"use strict";n.d(t,{LoginRecentUsersGallery:()=>o});var r=n(570655),o=function(){function e(e){this.containerEl=e,this.viewportEl=e.firstElementChild,this.layerEl=this.viewportEl.firstElementChild,this.initializeSlides()}return e.prototype.init=function(){this.setIndex(0)},e.prototype.initializeSlides=function(){var e;this.slides=(0,r.__spreadArray)([],(0,r.__read)(this.layerEl.children)).map((function(e,t){return{coordX:t*e.offsetWidth,width:e.offsetWidth,el:e}})),this.viewportEl.style.width=(null===(e=this.slides[0])||void 0===e?void 0:e.width)+"px";var t=this.containerEl.offsetWidth,n=this.viewportEl.offsetWidth;this.layerWidth=this.slides.reduce((function(e,t){return t.width+e}),0),this.min=n-(t-n)/2-this.layerWidth,this.max=0},e.prototype.validateIndent=function(e){var t=this.min,n=this.max;return e<t?t:e>n?n:e},e.prototype.calculateIndent=function(e){var t=this.slides,n=t.length?t[e]:null;if(n){var r=n.coordX;return this.validateIndent(-1*r)}return 0},e.prototype.render=function(){var e=this,t=this.calculateIndent(this.currentIndex);requestAnimationFrame((function(){e.layerEl.style.transform="translateX("+t+"px)"})),(0,r.__spreadArray)([],(0,r.__read)(this.layerEl.children)).forEach((function(t,n){t.classList.toggle("LoginRecentUsersGallery__slide--prev2",n===e.currentIndex-2),t.classList.toggle("LoginRecentUsersGallery__slide--active",n===e.currentIndex),t.classList.toggle("LoginRecentUsersGallery__slide--next2",n===e.currentIndex+2)}))},e.prototype.setRelativeIndex=function(e){this.currentIndex=Math.max(0,Math.min(this.currentIndex+e,this.slides.length-1)),this.onChange(this.currentIndex),this.render()},e.prototype.setIndex=function(e){this.currentIndex=Math.max(0,Math.min(e,this.slides.length-1)),this.onChange(this.currentIndex),this.render()},e}()},563555:(e,t,n)=>{"use strict";n.d(t,{ConfirmBoxComponent:()=>u});var r=n(570655),o=n(667294),i=n(86894),a=n(457994),s=n(733024),c=n(41650),l=n(495283),u=function(e){var t,n=e.box,u=e.onLogout,d=e.onProceedUrl,_=e.onCancel;switch(n.type){case"im":t=n.photo?o.createElement(i.Avatar,{className:"LogoutConfirmBox__avatar",src:n.photo,size:56}):o.createElement(i.InitialsAvatar,{className:"LogoutConfirmBox__avatar",gradientColor:Math.abs(n.entity_id)%6+1,size:56},(0,r.__spreadArray)([],(0,r.__read)((0,l.decodeHTMLEntities)(n.entity_name||"")))[0]);break;case"wall":t=o.createElement(a.default,{className:"LogoutConfirmBox__icon"})}return o.createElement(i.ConfigProvider,{scheme:"inherit"},o.createElement(i.AppRoot,{mode:"partial",noLegacyClasses:!0},o.createElement("div",{className:"LogoutConfirmBox"},t,o.createElement("div",{className:"LogoutConfirmBox__header"},o.createElement(i.Title,{Component:"div",weight:"regular",level:"2"},(0,l.decodeHTMLEntities)(n.title))),o.createElement(i.Text,{className:"LogoutConfirmBox__text",Component:"div",weight:"regular"},(0,l.decodeHTMLEntities)(n.text)),o.createElement("div",{className:"LogoutConfirmBox__actions"},o.createElement("div",{className:"LogoutConfirmBox__primaryAction"},o.createElement(i.Button,{mode:"primary",size:"s",onClick:u},(0,c.getLang)("global_head_logout"))),o.createElement(i.Button,{mode:"tertiary",size:"s",onClick:d},(0,l.decodeHTMLEntities)(n.button))),o.createElement("div",{className:"LogoutConfirmBox__close"},o.createElement(i.Tappable,{hoverMode:"opacity",activeMode:"opacity",onClick:_},o.createElement(s.default,null))))))}},449162:(e,t,n)=>{"use strict";n.d(t,{showLogoutConfirmation:()=>d});var r=n(570655),o=n(667294),i=n(973935),a=n(28238),s=n(29376),c=n(654612),l=n(563555),u=n(961540);function d(e,t){var n=function(){var e=[],t=[],n=(0,a.imDbGet)(window.vk.id);Object.keys(n).forEach((function(t){if(t.startsWith("draft_")){var n=parseInt(t.replace("draft_",""));Number.isFinite(n)&&e.push(n)}}));var o=(0,s.getAllWallDrafts)();return Object.entries(o).forEach((function(e){var n=(0,r.__read)(e,2)[1];t.push(n.from+"_"+n.to)})),{peers:e,wall:t}}();window.ajax.post("/al_index.php?act=a_logout_confirmation_box",{peers:n.peers,wall:n.wall,hash:e},{progress:!0,onDone:function(n){var r=n.box;if(r){var a=!1,s=new c.MessageBox({title:"",bodyStyle:"padding: 0",noControls:!0,onShow:function(){i.render(o.createElement(l.ConfirmBoxComponent,{box:r,onLogout:function(){a=!0,s.hide(),_(e,!0).then((function(){t()})).catch(u.noop)},onProceedUrl:function(){a=!0,s.hide(),window.nav.go(r.url),_(e,!0).catch(u.noop)},onCancel:function(){s.hide()}}),s.bodyNode)},onHide:function(){a||_(e,!1).catch(u.noop)},onBeforeHide:function(){i.unmountComponentAtNode(s.bodyNode)}});s.show()}else t()},onFail:function(){return t(),!0}})}function _(e,t){return new Promise((function(n){window.ajax.post("/al_index.php?act=a_hide_logout_confirmation_box",{hash:e,success:t?1:0},{onDone:function(){n(!0)},onFail:function(){return n(!1),!0}})}))}},718253:(e,t,n)=>{"use strict";n.d(t,{MARKET_ALIEXPRESS_APP_ID:()=>r,MARKET_ALIEXPRESS_APP_NAME:()=>o,MARKET_ALIEXPRESS_HOME_URL:()=>i,MARKET_ALIEXPRESS_GROUP_ID:()=>a,MARKET_YOULA_GROUP_ID:()=>s,GROUP_ORDERS_COLUMNS_STORAGE_KEY:()=>c,GROUP_ORDERS_DEFAULT_COLUMNS:()=>l});var r=6706576,o="ae_app",i="https://aliexpress.com",a=36941068,s=198582766,c="GroupOrdersPageTableSettings",l=["fullId","date","status","userName","deliveryOption","totalPrice","merchantComment","colorTags"]},674402:(e,t,n)=>{"use strict";n.d(t,{MARKET_EVENT_COUNTER_SECTION_ID:()=>o,updateMarketMenuEventCounter:()=>i});var r=n(364702),o="page_menu_group_market";function i(e,t){var n=document.querySelector(e);n&&r.PageActionCell.setCounter(n,t)}},179288:(e,t,n)=>{"use strict";n.d(t,{MENTION:()=>a,MENTION_RAW:()=>s,CONTROLLER:()=>c,FAVORITES_ICON_URL:()=>l,SENDING_ICON_TIMEOUT:()=>u,ConvoListFolder:()=>o,FOLDER_ALL:()=>h,FOLDER_IMPORTANT:()=>f,FOLDER_MARKED_UNREAD:()=>m,FOLDER_MESSAGE_REQUEST:()=>v,FOLDER_MESSAGE_REQUEST_REJECTED:()=>g,FOLDER_UNREAD:()=>y,FOLDER_UNRESPOND:()=>E,FOLDER_PEER_TAGS:()=>w,FOLDER_NOT_IMPORTANT_MESSAGE_REQUEST:()=>b,FOLDER_BUSINESS_NOTIFY:()=>C,FOLDER_ARCHIVE:()=>S,FOLDER_MASKS:()=>T,ConvoAction:()=>_,FolderAction:()=>p});var r,o,i=n(19331),a=/\[(id|club)(\d+)(?:\:([a-z0-9_\-]+))?\|([^\$]+?)\]/g,s=/(^|[\s.,:\'\";>\)\(])(\*|@)([A-Za-z0-9_\.]{2,32})\s*\((.+?)\)/g,c="al_im.php",l="/images/icons/im_favorites_100.png",u=2e3;!function(e){e.ALL="all",e.IMPORTANT="important",e.MR="mr",e.UNREAD="unread",e.UNRESPOND="unrespond",e.AD_TAG="ad_tag",e.BUSINESS_NOTIFY="business_notify",e.ARCHIVE="archive",e.PEER_TAGS="custom_tag"}(o||(o={}));o.AD_TAG;var d,_,p,h=o.ALL,f=o.IMPORTANT,m="marked_unread",v=o.MR,g="mr_rejected",y=o.UNREAD,E=o.UNRESPOND,w="custom_tag",b="mr_not_important",C=o.BUSINESS_NOTIFY,S=o.ARCHIVE,T=((r={})[o.UNRESPOND]=2,r[o.IMPORTANT]=1,r[o.MR]=256,r[o.BUSINESS_NOTIFY]=8192,r[o.ARCHIVE]=1<<23,r[g]=512,r[o.AD_TAG]=32768,r[m]=1<<20,r);(0,i.partConfigEnabled)("test_folder_masks")&&(T[b]=1<<22),function(e){e.USER="user",e.COMMUNITY="community",e.CHAT="chat",e.CHANNEL="channel",e.MR="mr",e.CHAT_MR="chat_mr",e.EMAIL="email",e.CONTACT="contact",e.BUSINESS_NOTIFY="business_notify"}(d||(d={})),function(e){e.SETTINGS="settings",e.BLOCK="block",e.CHAT_INVITE="chat_invite",e.USER_INVITE="user_invite",e.CREATE_CHAT="create_chat",e.MEDIA="media",e.SEARCH="search",e.PIN_HIDE="pin_hide",e.PIN_UNHIDE="pin_unhide",e.UNPIN="unpin",e.MUTE="mute",e.UNMUTE="unmute",e.CLEAR="clear",e.LEAVE="leave",e.RETURN="return",e.BLOCK_COMMUNITY="block_community",e.ALLOW_COMMUNITY="allow_community",e.BLOCK_NOTIFY="block_notify",e.CALL_AUDIO="call_audio",e.CALL_VIDEO="call_video",e.CALL_APP="call_app",e.UNREAD="unread",e.PIN_CONVO="pin_convo",e.UNPIN_CONVO="unpin_convo",e.CALL_BY_NAME="call_by_name",e.ENABLE_BUSINESS_NOTIFY="enable_business_notify",e.DISABLE_BUSINESS_NOTIFY="disable_business_notify",e.BUSINESS_NOTIFY="business_notify",e.ARCHIVE="archive",e.UNARCHIVE="unarchive",e.ADD_FRIEND="add_friend"}(_||(_={})),function(e){e.SHOW="show"}(p||(p={}))},826542:(e,t,n)=>{"use strict";n.d(t,{addChatMembers:()=>a,getConversations:()=>s,renewHash:()=>c,HintsSearchType:()=>r,hints:()=>l,ownerPhoto:()=>u,multiStart:()=>d,ownerPhotoSave:()=>_,kickUser:()=>p,pinConvo:()=>h,unpinConvo:()=>f,getRecommendedContacts:()=>m,resetTopMessageCounter:()=>v,toggleHideFolder:()=>g,toggleHideFolderNotice:()=>y,start:()=>E});var r,o=n(887294),i=n(179288),a=function(e,t,n,r,a){return(0,o.post)(i.CONTROLLER,{act:"a_add_chat_members",peer:e,new_peer:t.join(","),gid:n,hash:r,show_history:a?1:0})},s=function(e,t,n,r,a){return(0,o.post)(i.CONTROLLER,{act:"a_get_conversations",offset:a,count:r,filter:n,gid:t,hash:e})},c=function(e,t){return(0,o.post)(i.CONTROLLER,{act:"a_renew_hash",peers:e.join(","),gid:t})};!function(e){e.FRIENDS="friends",e.FRIENDS_AND_CONTACTS="friends_and_contacts",e.ALL="all"}(r||(r={}));var l=function(e,t,n,r){return(0,o.post)(i.CONTROLLER,{act:"a_hints",str:e,gid:t,query:n,peerIds:r.join(",")})},u=function(e,t){return(0,o.post)(i.CONTROLLER,{act:"a_owner_photo",photo:e,peer:t})},d=function(e,t,n,r,a,s,c){return void 0===s&&(s=!1),void 0===c&&(c=!1),(0,o.post)(i.CONTROLLER,{act:"a_multi_start",hash:e,peers:t.join(","),title:n,flags:r,gid:a,is_community_chat:Number(s),is_donut_chat:Number(c)})},_=function(e,t,n){return(0,o.post)("al_page.php",{act:"owner_photo_save",peer:e,_query:t,gid:n})},p=function(e,t,n,r){return(0,o.post)(i.CONTROLLER,{act:"a_kick_user",chat:e,hash:n,mid:t,gid:r})},h=function(e,t){return(0,o.post)(i.CONTROLLER,{act:"a_pin_convo",peer_id:e,hash:t})},f=function(e,t){return(0,o.post)(i.CONTROLLER,{act:"a_unpin_convo",peer_id:e,hash:t})},m=function(){return(0,o.post)(i.CONTROLLER,{act:"a_recommend_contacts"})},v=function(){return(0,o.post)(i.CONTROLLER,{act:"a_reset_top_counter"})},g=function(e,t,n,r){return(0,o.post)(i.CONTROLLER,{act:"a_toggle_hide_folder",folder:e,hash:r,hide:t?1:0,reset:n?1:0})},y=function(e,t,n){return(0,o.post)(i.CONTROLLER,{act:"a_toggle_hide_folder_notice",notice:e,hide:t,hash:n})},E=function(e,t,n,r,a,s){return(0,o.post)(i.CONTROLLER,{act:"a_start",peer:e,msgid:t,history:Number(n),prevpeer:r,gid:a,block:s})}},754204:(e,t,n)=>{"use strict";n.d(t,{logImError:()=>o,getErrorText:()=>i});var r=n(66433);function o(e,t){if(void 0===t&&(t=""),console.error(e),window.Raven){var n=function(e){(0,r.logError)(e,{environment:"im"})};if(e instanceof Error){var o=new Error(i(e,t));return o.name=e.name,o.stack=e.stack,n(o)}return n(new Error(i(e,t)))}}function i(e,t){if(void 0===t&&(t=""),e instanceof Error)return t?t+": "+e.message:e.message;if("string"==typeof e||"number"==typeof e)return t?t+": "+e:""+e;if(e&&"api_error"===e.type){var n=JSON.stringify(e.error);return t?t+": "+n:n}if(e instanceof Object){n="";try{n=JSON.stringify(e)}catch(e){n="Error data "+e}return t?t+": "+n:n}return t}},523459:(e,t,n)=>{"use strict";n.d(t,{showMyQuestionsBox:()=>d,showAskQuestionBox:()=>_});var r=n(570655),o=n(315544),i=n(486125),a=n(451888),s=n(35779),c=n(19331),l=n(664260),u=n(734234);function d(e){var t;if((0,c.partConfigEnabled)("profile_questions_enabled"))if(window.cur.viewAsBox)window.cur.viewAsBox();else if(!(null===(t=window.MyQuestionsBox)||void 0===t?void 0:t.isMounted())){(null==e?void 0:e.ref)&&(0,u.logQuestionsOpeningEvent)(window.vk.id,e.ref,l.QuestionAnalyticBoxName.myQuestions);var n=document.querySelector("#box_layer_wrap"),d=document.querySelector("#box_loader");(0,o.show)(n),(0,o.show)(d),(0,i.boxRefreshCoords)(d),Promise.all([(0,a.getQuestions)(),window.stManager.add([window.jsc("web/my_questions.js")]),new Promise((function(e,t){window.ajax.post("al_questions.php",{act:"load_ask_my_questions_box_lang_keys"},{onDone:function(){e()},onFail:function(){return t(),!0}})}))]).then((function(t){var i=(0,r.__read)(t,1)[0];window.boxQueue.count()||(0,o.hide)(n),(0,o.hide)(d),window.MyQuestionsBox.init(i.count,i.items,i.profiles,i.next_from,{onClose:null==e?void 0:e.onClose,fromElement:null==e?void 0:e.fromElement})})).catch((function(e){(0,o.hide)(n),(0,o.hide)(d),(0,s.logQuestionError)(e,"An error occurred while loading data for my_questions.js")}))}}function _(e,t){var n;if((0,c.partConfigEnabled)("profile_questions_enabled"))if(e!==window.vk.id){if(window.cur.viewAsBox)window.cur.viewAsBox();else if(!(null===(n=window.AskQuestionBox)||void 0===n?void 0:n.isMounted()))if(e){(null==t?void 0:t.ref)&&(0,u.logQuestionsOpeningEvent)(e,t.ref,l.QuestionAnalyticBoxName.askQuestion);var _=document.querySelector("#box_layer_wrap"),p=document.querySelector("#box_loader");(0,o.show)(_),(0,o.show)(p),(0,i.boxRefreshCoords)(p),Promise.all([(0,a.getUsers)([e]),window.stManager.add([window.jsc("web/ask_question.js")]),new Promise((function(e,t){window.ajax.post("al_questions.php",{act:"load_ask_question_box_lang_keys"},{onDone:function(){e()},onFail:function(){return t(),!0}})}))]).then((function(e){var n=(0,r.__read)(e,1)[0];(0,o.hide)(_),(0,o.hide)(p);var i=n[0];i&&window.AskQuestionBox.init(i,null==t?void 0:t.fromElement)})).catch((function(e){(0,o.hide)(_),(0,o.hide)(p),(0,s.logQuestionError)(e,"An error occurred while loading data for ask_question.js")}))}else(0,s.logQuestionError)("Empty toUserId has been passed to showAskQuestionBox")}else d({ref:null==t?void 0:t.ref,fromElement:null==t?void 0:t.fromElement})}},813981:(e,t,n)=>{"use strict";n.d(t,{initColorSchemeDropdowns:()=>i});var r=n(570655),o=n(511417);function i(){document.querySelectorAll(".SettingsColorSchemeDropdown").forEach((function(e){!function(e){if(!e.dataset.inited){e.dataset.inited="1";var t=e.dataset.value,n=JSON.parse(e.dataset.items||"[]");o.ColorScheme.isSchemesAutoSwitchingSupported()||(t===o.ColorSchemeMode.Auto&&(t=o.ColorSchemeMode.Light),n=n.filter((function(e){return(0,r.__read)(e,1)[0]!==o.ColorSchemeMode.Auto})));var i=new window.InlineDropdown(e,{selected:t,items:n,onSelect:function(t){o.colorScheme.setMode(t);var n=e.dataset.hash;window.ajax.post("al_settings.php?act=a_save_color_scheme_mode",{mode:t,hash:n})}}),a=o.colorScheme.subscribe((function(){e&&i?i.val(o.colorScheme.getMode(),!0):a()}))}}(e)}))}},346549:(e,t,n)=>{"use strict";n.d(t,{createAppearanceModifier:()=>o,createSizeModifier:()=>i,createElement:()=>a,setContent:()=>s});var r=n(830104);function o(e){return"FlatButton--"+e}function i(e){return"FlatButton--size-"+e}function a(e,t){var n=document.createElement(e);return t&&(n.className=t),n}function s(e,t){null!=t&&((0,r.emptyNode)(e),"string"==typeof t?e.innerHTML=t:e.appendChild(t))}},124041:(e,t,n)=>{"use strict";n.d(t,{FlatButton:()=>u,FlatButtonAppearance:()=>s.FlatButtonAppearance,FlatButtonSize:()=>s.FlatButtonSize});var r=n(659397),o=n(62816),i=n(60804),a=n(346549),s=n(957047),c=n(66342);function l(e){return!!e&&e.classList.contains("FlatButton--locked")}var u={isFlatButton:function(e){return Boolean(e&&e.classList&&e.classList.contains("FlatButton"))},lock:function(e){if(e&&!l(e)){var t=e.classList.contains((0,a.createSizeModifier)(s.FlatButtonSize.L)),n=t?(0,i.getIcon24Spinner)().icon:(0,o.getIcon16Spinner)().icon,c=(0,a.createElement)("span",(0,r.classNames)("FlatButton__spinner",{"FlatButton__spinner--l":t}));c.innerHTML=n,e.appendChild(c),e.classList.add("FlatButton--locked")}},unlock:function(e){var t;e&&(null===(t=e.querySelector(".FlatButton__spinner"))||void 0===t||t.remove(),e.classList.remove("FlatButton--locked"))},isLocked:l,isDisabled:function(e){return!!e&&e.classList.contains("FlatButton--disabled")},render:c.render,setDisabled:function(e,t){void 0===t&&(t=!0),e&&("button"===e.tagName.toLowerCase()&&(e.disabled=t),e.classList.toggle("FlatButton--disabled",t))},setAppearance:function(e,t){e&&Object.values(s.FlatButtonAppearance).forEach((function(n){e.classList.toggle((0,a.createAppearanceModifier)(n),n===t)}))},setSize:function(e,t){e&&Object.values(s.FlatButtonSize).forEach((function(n){e.classList.toggle((0,a.createSizeModifier)(n),n===t)}))},setLabel:function(e,t){var n=null==e?void 0:e.querySelector(".FlatButton__content");n&&(0,a.setContent)(n,t)},setBefore:function(e,t){var n=null==e?void 0:e.querySelector(".FlatButton__in");if(n){var r=e.querySelector(".FlatButton__before");null!=t?r?(0,a.setContent)(r,t):n.prepend((0,c.renderBefore)(t)):null==r||r.remove()}},setAfter:function(e,t){var n=null==e?void 0:e.querySelector(".FlatButton__in");if(n){var r=e.querySelector(".FlatButton__after");null!=t?r?(0,a.setContent)(r,t):n.prepend((0,c.renderAfter)(t)):null==r||r.remove()}}}},66342:(e,t,n)=>{"use strict";n.d(t,{render:()=>a,renderBefore:()=>s,renderAfter:()=>c});var r=n(570655),o=n(659397),i=n(346549);function a(e){var t,n=e.children,a=e.before,l=e.after,u=e.className,d=e.appearance,_=e.size,p=e.round,h=e.wide,f=e.flexWide,m=e.href,v=e.disabled,g=e.noPointerEventsForContent,y=e.restAttrs,E=void 0===y?{}:y,w=e.dangerousAttrbutesCode,b=(0,r.__assign)({},E);m?(t=document.createElement("a"),b.href=m):(t=document.createElement("button"),b.type||(b.type="button"));var C=t.tagName.toLowerCase();t.className=(0,o.classNames)("FlatButton",(0,i.createAppearanceModifier)(d),(0,i.createSizeModifier)(_),{"FlatButton--round":p,"FlatButton--wide":h,"FlatButton--flexWide":f,"FlatButton--disabled":v},u),Object.entries(b).forEach((function(e){var n=(0,r.__read)(e,2),o=n[0],i=n[1];null!=i&&t.setAttribute(o,String(i))})),v&&"button"===C&&(t.disabled=!0);var S=(0,i.createElement)("span",(0,o.classNames)("FlatButton__in",{"FlatButton__in--noPointerEvents":g}));t.appendChild(S);var T=(0,i.createElement)("span","FlatButton__content");if((0,i.setContent)(T,n),a&&S.appendChild(s(a)),S.appendChild(T),l&&S.appendChild(c(l)),w){var A=document.createElement("div");A.innerHTML="<div "+w+"></div>";var D=A.firstElementChild;if(!D)return t;var P=D.attributes;Object.keys(P).forEach((function(e){var n=P[Number(e)],r=n.value;null!=r&&t.setAttribute(n.name,r)}))}return t}function s(e){var t=(0,i.createElement)("span","FlatButton__before");return(0,i.setContent)(t,e),t}function c(e){var t=(0,i.createElement)("span","FlatButton__after");return(0,i.setContent)(t,e),t}},957047:(e,t,n)=>{"use strict";n.d(t,{FlatButtonAppearance:()=>r,FlatButtonSize:()=>o});var r={PRIMARY:"primary",SECONDARY:"secondary",TERTIARY:"tertiary",POSITIVE:"positive",NEGATIVE:"negative",OVERLAY_PRIMARY:"overlay-primary"},o={S:"s",M:"m",L:"l"}},364702:(e,t,n)=>{"use strict";n.d(t,{PageActionCell:()=>s});var r=n(315544),o=n(62816);function i(e){return null!=e&&e.classList.contains("PageActionCell")}var a="PageActionCell--locked";var s={isPageActionCell:i,isLocked:function(e){return i(e)&&e.classList.contains(a)},lock:function(e){e&&(e.classList.contains(a)||(e.lockTimeout&&clearTimeout(e.lockTimeout),e.resetLockTimeout=!1,e.lockTimeout=window.setTimeout((function(){if(!e.resetLockTimeout){var t=(0,r.ce)("div",{className:"PageActionCell__spinner"});t.innerHTML=(0,o.getIcon16Spinner)().icon,e.prepend(t),e.classList.add(a)}}),500)))},unlock:function(e){if(e&&(e.resetLockTimeout=!0,e.classList.contains(a))){e.classList.remove(a);var t=e.querySelector(".PageActionCell__spinner");t&&t.remove()}},update:function(e,t){var n=t.icon,r=t.label,o=t.counter,i=e.querySelector(".PageActionCell__label");if(i&&(i.innerHTML=r),void 0!==n){var a=e.querySelector(".PageActionCell__icon");a&&(a.innerHTML=n)}if(void 0!==o){var s=e.querySelector(".PageActionCell__counter");s&&(s.innerHTML=o)}},setDescription:function(e,t){var n,r=e.querySelector(".PageActionCell__description");(r||t)&&(r||((r=document.createElement("span")).className="PageActionCell__description",null===(n=e.querySelector(".PageActionCell__in"))||void 0===n||n.append(r)),t?r.innerHTML=t:r.remove())},getLabelElement:function(e){return e.querySelector(".PageActionCell__label")},getCounter:function(e){var t=e.querySelector(".PageActionCell__counter");return t&&Number(t.innerHTML)||0},setCounter:function(e,t){var n=e.querySelector(".PageActionCell__counter");!n&&t<=0||(n||((n=document.createElement("div")).classList.add("PageActionCell__counter"),e.appendChild(n)),t<=0?n.remove():n.innerHTML=String(t))}}},576772:(e,t,n)=>{"use strict";n.d(t,{UnauthActionBox:()=>d});var r=n(570655),o=n(214547),i=n(740517),a=n(215949),s=n(654612),c=n(659397),l=n(468770),u=n(267394);var d={show:function(e,t){var n=e.withForm,d=new s.MessageBox({title:"",width:n?796:450,hideButtons:!0,containerClass:(0,c.classNames)("UnauthActionBoxContainer",{"UnauthActionBoxContainer--form":n}),onHide:function(){t&&t()}});d.content(e.html),d.changed=!0;var _=d.bodyNode.querySelector(".UnauthActionBox__close"),p=d.bodyNode.querySelector(".UnauthActionBox__join"),h=d.bodyNode.querySelector(".UnauthActionBox__login"),f=function(t){o.marketingTransitionItemStat.logEvent(i.MarketingTransitionItemCampaignType.UNAUTH_ACTION_BOX,t,e.action,window.location.href)};null==_||_.addEventListener("click",(function(){f(i.MarketingTransitionItemEventType.CLOSE),d.hide()})),null==p||p.addEventListener("click",(function(){f(i.MarketingTransitionItemEventType.CLICK_SIGN_UP),(0,a.showJoinBox)()})),null==h||h.addEventListener("click",(function(){f(i.MarketingTransitionItemEventType.CLICK_SIGN_IN),(0,a.showQuickLoginBox)()})),f(i.MarketingTransitionItemEventType.OPEN),d.show();var m=d.bodyNode.querySelector(".LoginCombinedBox"),v=d.bodyNode.querySelector(".JoinForm"),g=function(e){e.preventDefault(),f(i.MarketingTransitionItemEventType.CLOSE),d.hide()};return d.bodyNode.querySelectorAll(".LoginBox").forEach((function(e){(0,l.initLoginBoxForm)(e)})),d.bodyNode.querySelectorAll(".LoginBox__notNow").forEach((function(e){e.addEventListener("click",g)})),d.bodyNode.querySelectorAll(".JoinForm__signIn, .LoginRecentBox__alternative").forEach((function(e){e.addEventListener("click",(function(){f(i.MarketingTransitionItemEventType.CLICK_SIGN_IN)}))})),d.bodyNode.querySelectorAll(".LoginBox__buttonSignUp").forEach((function(e){e.addEventListener("click",(function(){f(i.MarketingTransitionItemEventType.CLICK_SIGN_UP)}))})),m?(0,l.initLoginCombinedBoxForm)(m,e.formOptions):v&&(0,u.initJoinForm)(v,(0,r.__assign)((0,r.__assign)({},e.formOptions),{onSignInClick:function(){(0,a.showQuickLoginBox)()},onNotNowClick:g,ref:"box"})),requestAnimationFrame((function(){return window.tooltips&&window.tooltips.hideAll()})),d}}},273271:(e,t,n)=>{"use strict";n.d(t,{isUnauthorizedMediaLayerBoxAvailable:()=>s,UnauthorizedSourceType:()=>a.UnauthorizedSourceType,Unauthorized:()=>l});var r,o=n(576772),i=n(19331),a=n(859866);function s(){return!window.vk.id&&!window.layers.visible&&(0,i.partConfigEnabled)("unauthorized_media_layer_box")&&!!document.querySelector(".PageBottomBanner--unauth")}var c=!1;var l={initScrollMoreBox:function(e){var t,n=function(){c=!1,window.removeEventListener("scroll",r)};n(),r=function(){var t;c||((null===(t=window.layers)||void 0===t?void 0:t.visible)||window.cur.unauthScrollMoreBox||window.pageYOffset>=2*window.innerHeight&&(c=!0,o.UnauthActionBox.show(e)))},e.showOnLoad&&(c=!0,o.UnauthActionBox.show(e)),window.addEventListener("scroll",r),null===(t=window.cur.beforeNavigateRequestHandlers)||void 0===t||t.push((function(){return n()}))},showMoreBox:function(e,t,n,r){e&&e.preventDefault(),window.ajax.post("/al_index.php?act=a_unauthorized_box",{action:"more",owner_id:t,source:n},{loader:!0,onDone:function(e){e.unauth_action_box?o.UnauthActionBox.show(e.unauth_action_box,r):r&&r()}})}}},108046:(e,t,n)=>{"use strict";n.d(t,{idlizeCall:()=>r});var r=function(e,t){void 0===t&&(t=1e3);var n=function(){setTimeout((function(){return e()}),t)};return"requestIdleCallback"in window?window.requestIdleCallback(n,{timeout:5e3}):n()}},29376:(e,t,n)=>{"use strict";n.d(t,{parseObjectPostId:()=>i,buildOwnerDraftKey:()=>a,getAllWallDrafts:()=>s});var r=n(570655),o=n(522683),i=function(e){var t=e.match(/(-?\d+)(_?)(photo|video|note|topic|market|wall_reply|note_reply|photo_comment|video_comment|topic_comment|market_comment|)(\d+)/);if(t)return{type:t[3]||"wall",id:t[1]+"_"+t[4]}},a=function(e){return"wall_draft"+window.vk.id+"_"+e},s=function(){return o.vkLocalStorage.keys().reduce((function(e,t){var n=function(e){var t=e.match(/wall_draft(\d+)_(-?\d+)/);return t?{vkId:Number(t[1]),toId:Number(t[2])}:null}(t);if(t.startsWith("wall_draft"+window.vk.id)&&n)try{var i=JSON.parse(o.vkLocalStorage.getItem(t)||"{}");e[t]=(0,r.__assign)((0,r.__assign)({},i),{to:n.toId,from:Number(i.from)})}catch(e){}return e}),{})}},173674:(e,t,n)=>{"use strict";n.d(t,{CallStatReachedType:()=>p.CallStatReachedType,CallStatResult:()=>p.CallStatResult,CallStatFailReason:()=>p.CallStatFailReason,CallStatSource:()=>p.CallStatSource,CallActionEventType:()=>p.CallActionEventType,VIDEO_SLOTS_COUNT:()=>h,NoiseCancellationTypes:()=>l,VideoResolutionTypes:()=>u,VIDEO_RESOLUTION_STORAGE_KEY:()=>k,VK_HOST:()=>R,LOCALSTORAGE_IS_CALLS_APP_DOWNLOADED:()=>L,DESKTOP_CALLS_SCHEME:()=>x,DESKTOP_CALLS_HOST:()=>N,DESKTOP_CALLS_DOWNLOAD_PAGE:()=>B,DESKTOP_CALLS_DOWNLOAD:()=>U,CALLS_DESKTOP_APP_NOTIFICATION:()=>F,DESKTOP_CALLS_FILENAME:()=>W,VideoHeight:()=>f,VideoWidth:()=>m,ParticipantsManagementMode:()=>v,MediaPermissionType:()=>g,ErrorHandleType:()=>y,CallErrorType:()=>E,MediaError:()=>w,FatalError:()=>b,SearchResultType:()=>C,Mode:()=>S,E_ACTION:()=>T,CallType:()=>A,UIMode:()=>D,NotificationType:()=>P,SdkHandType:()=>O,SdkErrorType:()=>I,defaultNotificationLifeSpan:()=>H,VOLUME_LEVEL_DETECTION:()=>j,DEFAULT_AVATAR:()=>K,DEFAULT_GROUP_CALL_PHOTO:()=>z,HANGUP_DELAY:()=>G,CLIENT_ERROR_UNKNOWN:()=>q,SERVER_ERROR_UNKNOWN:()=>Y,SERVER_ERROR_INVALID_REQUEST:()=>$,SERVER_ERROR_FLOOD_CONTROL:()=>X,SERVER_ERROR_INTERNAL:()=>Q,SERVER_ERROR_OLD_RECEIVER_APP:()=>J,SERVER_ERROR_PRIVACY:()=>Z,SERVER_ERROR_BUSY:()=>ee,SERVER_ERROR_REQUIRE_AUTH:()=>te,SERVER_ERROR_MESSAGES_CALL_JOIN_NOT_ALLOWED:()=>ne,SERVER_ERROR_MESSAGES_CALL_NOT_FOUND:()=>re,SDK_ERROR_AUTH:()=>oe,POPUP_SETTINGS:()=>ie,POPUP_TRANSLATION:()=>ae,POPUP_TRANSLATION_START_COUNTDOWN:()=>se,POPUP_TRANSLATION_STOP:()=>ce,POPUP_TRANSLATION_SHARE:()=>le,POPUP_EXIT:()=>ue,POPUP_UNMUTE_REQUEST:()=>de,POPUP_UNMUTE_AUDIO_REQUEST:()=>_e,POPUP_ADMIN_PIN_UNMUTE_REQUEST:()=>pe,POPUP_TRANSFER_ADMIN_RIGHTS:()=>he,POPUP_VIRUTAL_BACKGROUND:()=>fe,POPUP_UPLOAD_BACKGROUND_PHOTO:()=>me,POPUP_UPLOAD_BACKGROUND_ERROR:()=>ve,POPUP_ON_CALL_HANGUP_BUSY:()=>ge,POPUP_ON_CALL_HANGUP_KILLED:()=>ye,POPUP_ON_CALL_HANGUP_REMOVED:()=>Ee,POPUP_ON_CALL_HANGUP_BANNED:()=>we,HANGUP_TYPE_BUSY:()=>be,HANGUP_TYPE_CALLEE_IS_OFFLINE:()=>Ce,HANGUP_TYPE_CALLER_IS_BLOCKED:()=>Se,HANGUP_TYPE_CANCELED:()=>Te,HANGUP_TYPE_EXTERNAL_API_ERROR:()=>Ae,HANGUP_TYPE_FAILED:()=>De,HANGUP_TYPE_HUNGUP:()=>Pe,HANGUP_TYPE_MISSED:()=>Oe,HANGUP_TYPE_NOT_FRIENDS:()=>Ie,HANGUP_TYPE_OLD_VERSION:()=>ke,HANGUP_TYPE_REJECTED:()=>Re,HANGUP_TYPE_REMOVED:()=>Me,HANGUP_TYPE_SERVICE_DISABLED:()=>Le,HANGUP_TYPE_UNKNOWN_ERROR:()=>xe,HANGUP_TYPE_UNSUPPORTED:()=>Ne,FLAG_OUTBOUND:()=>Be,FLAG_DELETED:()=>Ue,FLAG_SPAM:()=>Fe,INCOMING_CALL:()=>We,ADD_MESSAGE:()=>Ve,CONVERSATION_UPDATED:()=>He,MAIL_CHAT_UPDATE_TYPE_CALL_IN_PROGRESS_CHANGED:()=>je,READ_INBOUND:()=>Ke,SET_FLAGS:()=>ze,EDIT_MESSAGE:()=>Ge,REPLACE_MESSAGE:()=>qe,DELETE_DIALOG:()=>Ye,COUNT_OF_GROUP_MEMBERS_TO_LOAD:()=>$e,KickParticipantType:()=>V,CHAT_PEER_ID_OFFSET:()=>Je,EVideoEffectType:()=>Xe,EVideoOptionType:()=>Qe,LS_KEYS:()=>Ze,VIRTUAL_BACKGROUND_BLUR_ID:()=>et,CALL_HANGUP_MODAP_MAP:()=>tt});var r,o,i,a,s,c,l,u,d=n(464380),_=n(761108),p=n(363035),h=30;!function(e){e.NEURAL="NEURAL",e.SIMPLE="SIMPLE",e.NONE="NONE"}(l||(l={})),function(e){e.SD="SD",e.HD="HD",e.FHD="FHD"}(u||(u={}));var f,m,v,g,y,E,w,b,C,S,T,A,D,P,O,I,k="calls_video_resolution",R="vk.com",M="https://"+R,L="vkcalls:calls_app_downloaded",x="vkcalls://",N=R,B=M+"/video-calls",U=((r={})[_.OS.WINDOWS]="https://vkcalls-native-ac.vk-apps.com/latest/vk-calls.exe",r[_.OS.MAC]="https://vkcalls-native-ac.vk-apps.com/latest/vk-calls.dmg",r[_.OS.LINUX]={deb:(o={},o[_.ARCH.X64]="https://vkcalls-native-ac.vk-apps.com/latest/vk-calls-amd64.deb",o[_.ARCH.X86]="https://vkcalls-native-ac.vk-apps.com/latest/vk-calls-i386.deb",o),rpm:(i={},i[_.ARCH.X64]="https://vkcalls-native-ac.vk-apps.com/latest/vk-calls-x86_64.rpm",i[_.ARCH.X86]="https://vkcalls-native-ac.vk-apps.com/latest/vk-calls-i686.rpm",i)},r),F="calls_desktop_app_notification",W=((a={})[_.OS.WINDOWS]="vk-calls.exe",a[_.OS.MAC]="vk-calls.dmg",a[_.OS.LINUX]={deb:(s={},s[_.ARCH.X64]="vk-calls-amd64.deb",s)},a);!function(e){e[e.SD=360]="SD",e[e.HD=720]="HD",e[e.FHD=1080]="FHD"}(f||(f={})),function(e){e[e.SD=640]="SD",e[e.HD=1280]="HD",e[e.FHD=1920]="FHD"}(m||(m={})),function(e){e[e.SINGLE=0]="SINGLE",e[e.ALL=1]="ALL",e[e.SINGLE_AUDIO=2]="SINGLE_AUDIO",e[e.SINGLE_VIDEO=3]="SINGLE_VIDEO",e[e.ALL_AUDIO=4]="ALL_AUDIO",e[e.ALL_VIDEO=5]="ALL_VIDEO"}(v||(v={})),function(e){e[e.DENY=0]="DENY",e[e.ONCE=1]="ONCE",e[e.ALLOW=1/0]="ALLOW"}(g||(g={})),function(e){e[e.DECLINE=0]="DECLINE",e[e.PROCESS=1]="PROCESS",e[e.FATAL=2]="FATAL"}(y||(y={})),function(e){e.ALREADY_IN_CALL="already_in_call",e.CANT_REACH_API="cant_reach_api"}(E||(E={})),function(e){e.MIC_CAMERA_PERMISSION="mic_camera",e.CAMERA_PERMISSION="camera",e.MIC_PERMISSION="mic",e.CAMERA_ACCESS="cameralock",e.MIC_ACCESS="miclock",e.MIC_NOT_FOUND="nomic",e.SCREEN_PERMISSION="screenpermission",e.SCREEN_ACCESS="screenlock"}(w||(w={})),function(e){e.AUTH="auth"}(b||(b={})),function(e){e[e.HEADER=0]="HEADER",e[e.CALL_ALL_IN_CHAT=1]="CALL_ALL_IN_CHAT",e[e.MEMBERS_MORE=2]="MEMBERS_MORE",e[e.FRIENDS_MORE=3]="FRIENDS_MORE",e[e.GROUP_MEMBERS_MORE=4]="GROUP_MEMBERS_MORE"}(C||(C={})),function(e){e[e.READY=0]="READY",e[e.CALL=1]="CALL",e[e.INCOMING=2]="INCOMING",e[e.JOIN=3]="JOIN",e[e.ERROR=4]="ERROR",e[e.FEEDBACK=5]="FEEDBACK",e[e.START=6]="START",e[e.CALL_BY=7]="CALL_BY",e[e.CREATE_CALL=8]="CREATE_CALL",e[e.BLOCK=9]="BLOCK"}(S||(S={})),function(e){e.LOAD_PEERS="load_peer",e.CHANGE_MODE="change_mode",e.CALL_STATE="call_state",e.REMOVE_USER="remove_user",e.TIME_START="time_start",e.LOCAL_TIME_START="local_time_start",e.HANGUP="hangup",e.SET_CHAT_INFO="set_chat_info",e.GROUP_CALL_SETUP="group_call_setup",e.TOGGLE_POPUP="toggle_popup",e.UPDATE_HASH="update_hash",e.CHANGE_UI_MODE="change_ui_mode",e.SET_ORATOR="set_orator",e.TOGGLE_ORATOR_MODE="toggle_orator_mode",e.TOGGLE_PARTICIPANTS_ASIDE="toggle_participants_aside",e.SET_PINNED_PARTICIPANT="set_pinned_participant",e.SET_ADMIN_PINNED_PARTICIPANT="set_admin_pinned_participant",e.SET_SCREEN_SHARING_PINNED_PARTICIPANT="set_screen_sharing_pinned_participant",e.MANAGEMENT="management",e.CALL_NOTIFICATION="call_notification",e.JOIN="join",e.CALL_BY_NAME="call_by_name",e.CREATE_CALL_BY_LINK="create_call_by_link",e.ERROR="error",e.CHANGE_PARTICIPANT_ROLES="change_participant_roles",e.SET_SCREEN_SHARER="set_screen_sharer",e.SET_FRIENDS="set_friends",e.SET_GROUP_MEMBERS="set_group_members",e.SET_FOUNDED_GROUP_MEMBERS="set_group_members",e.SET_SPEAKERS="set_speakers",e.UPDATE_PARTICIPANTS_BATCH="update_participants_batch",e.SET_UNREAD_COUNT="set_unread_count",e.SHOW_CAUTION_BOX="show_caution_box",e.SHOW_LOADER="show_loader",e.SET_TOOLTIP="set_tooltip",e.MANUAL_ADD_PARTICIPANTS="manual_add_participants",e.SET_TRANSLATION="set_translation",e.UPDATE_ANON_SECRET="update_anon_token",e.TOGGLE_PARTICIPANTS_MANAGEMENT="toggle_participants_management",e.TOGGLE_PARTICIPANTS_KICK="toggle_participants_kick",e.TOGGLE_ADMIN_ASSIGNMENT="toggle_admin_assignment",e.SET_NOISE_CANCELLATION="set_noise_cancellation",e.CHANGE_LOCAL_VIDEO_RESOLUTION="change_local_video_resolution",e.SET_CONVERSATION_OPTIONS="set_conversation_options",e.SET_PRIVACY_SETTINGS="set_privacy_settings",e.UNBAN_PARTICIPANTS="unban_participants",e.SET_GROUP="set_group",e.SET_WAITING_HALL="set_waiting_hall",e.SET_PUSH_TO_TALK_ENABLE="set_push_to_talk_enable",e.SET_GRID_SCROLL_POSITION="set_grid_scroll_position",e.SET_ORATOR_SCROLL_POSITION="set_orator_scroll_position",e.SET_SHOW_DESKTOP_NOTIFICATION="set_show_desktop_notification",e.SET_SHOW_WARNING_DESKTOP_NOTIFICATION="set_show_warning_desktop_notification",e.SET_START_OPTIONS="set_start_params",e.VB_SET_USER_PHOTOS="vb_set_user_photos",e.VB_ADD_USER_PHOTO="vb_add_user_photo",e.VB_REMOVE_USER_PHOTO="vb_remove_user_photo",e.VB_SET_VIDEO_OPTIONS="vb_set_video_options",e.SET_CALL_PERMISSIONS="set_call_permissions",e.CLEAN_LAST_CALL_DATA="clean_last_call_data",e.SET_LAST_CALL_DATA="set_last_call_data",e.SET_LOCAL_DEVICE="set_local_device"}(T||(T={})),function(e){e.AUDIO="audio",e.VIDEO="video"}(A||(A={})),function(e){e.DEFAULT="default",e.COLLAPSED="collapsed",e.FULLSCREEN="fullscreen"}(D||(D={})),function(e){e.SPEAKING_ON_MUTE="SPEAKING_ON_MUTE",e.RAISED_HAND="RAISED_HAND",e.SCREEN_SHARING_STARTED="SCREEN_SHARING_STARTED",e.BAD_NETWORK_CONNECTION="BAD_NETWORK_CONNECTION",e.BAD_NETWORK_CONNECTION_DISABLE_CAMERA="BAD_NETWORK_CONNECTION_DISABLE_CAMERA",e.ADMIN_ROLE_GRANTED="ADMIN_ROLE_GRANTED",e.USER_GRANTED_WITH_ADMIN_ROLE="USER_GRANTED_WITH_ADMIN_ROLE",e.PINNED_BY_ADMIN="PINNED_BY_ADMIN",e.USER_PINNED_BY_ADMIN="USER_PINNED_BY_ADMIN",e.PUSH_TO_TALK="PUSH_TO_TALK",e.CONNECTING="CONNECTING",e.LINK_COPIED_TO_CLIPBOARD="LINK_COPIED_TO_CLIPBOARD",e.ADMIN_MUTE="ADMIN_MUTE",e.ADMIN_MUTE_AUDIO="ADMIN_MUTE_AUDIO",e.ADMIN_MUTE_VIDEO="ADMIN_MUTE_VIDEO",e.ADMIN_MUTE_PERMANENT="ADMIN_MUTE_PERMANENT",e.ADMIN_MUTE_PERMANENT_AUDIO="ADMIN_MUTE_PERMANENT_AUDIO",e.ADMIN_MUTE_PERMANENT_VIDEO="ADMIN_MUTE_PERMANENT_VIDEO",e.ADMIN_UNMUTE_PERMANENT="ADMIN_UNMUTE_PERMANENT",e.ADMIN_UNMUTE_PERMANENT_AUDIO="ADMIN_UNMUTE_PERMANENT_AUDIO",e.ADMIN_UNMUTE_PERMANENT_VIDEO="ADMIN_UNMUTE_PERMANENT_VIDEO"}(P||(P={})),function(e){e.LOWERED="0",e.RAISED="1"}(O||(O={})),function(e){e.NETWORK="network_error",e.API="api_error"}(I||(I={}));var V,H=5e3,j=.25,K=M+"/images/camera_400.png",z=M+"/images/call_convo_stub.png",G=2,q=-2,Y=1,$=8,X=9,Q=10,J=923,Z=928,ee=948,te=960,ne=963,re=951,oe=401,ie="settings",ae="translation",se="translation_start_countdown",ce="translation_stop",le="translation_stop_share",ue="exit",de="unmute_request",_e="unmute_audio_request",pe="admin_pin_unmute_request",he="transfer_admin_rights",fe="virtual_background",me="virtual_upload_background_photo",ve="virtual_upload_background_error",ge="on_call_hangup_busy",ye="on_call_hangup_killed",Ee="on_call_hangup_removed",we="on_call_hangup_banned",be=d.HangupType.BUSY,Ce=d.HangupType.CALLEE_IS_OFFLINE,Se=d.HangupType.CALLER_IS_BLOCKED,Te=d.HangupType.CANCELED,Ae=d.HangupType.EXTERNAL_API_ERROR,De=d.HangupType.FAILED,Pe=d.HangupType.HUNGUP,Oe=d.HangupType.MISSED,Ie=d.HangupType.NOT_FRIENDS,ke=d.HangupType.OLD_VERSION,Re=d.HangupType.REJECTED,Me=d.HangupType.REMOVED,Le=d.HangupType.SERVICE_DISABLED,xe=d.HangupType.UNKNOWN_ERROR,Ne=d.HangupType.UNSUPPORTED,Be=2,Ue=128,Fe=64,We="incoming_call",Ve="event_add_message",He="event_chat_updated",je=19,Ke="event_read_inbound",ze="event_set_flags",Ge="event_edit_message",qe="event_replace_message",Ye="event_delete_dialog",$e=500;!function(e){e[e.CALL=0]="CALL",e[e.WAITING_HALL=1]="WAITING_HALL"}(V||(V={}));var Xe,Qe,Je=2e9;!function(e){e.BACKGROUND="calls_background",e.BLUR="calls_blur",e.NONE="calls_none",e.ADD="calls_add"}(Xe||(Xe={})),function(e){e.IS_VIDEO_MIRRORED="calls_is_video_mirrored"}(Qe||(Qe={}));var Ze={VIRTUAL_BACKGROUND_EFFECT:"calls_virtual_background_effect",VIRTUAL_BACKGROUND_EFFECT_SELECTED_TS:"calls_virtual_background_effect_selected_ts",VIDEO_OPTIONS:"calls_video_options"},et=-16,tt=((c={})[d.HangupType.BUSY]=ge,c[d.HangupType.KILLED]=ye,c[d.HangupType.BANNED]=we,c[d.HangupType.REMOVED]=Ee,c)},761108:(e,t,n)=>{"use strict";n.d(t,{OS:()=>o,ARCH:()=>i,BROWSER:()=>a,Platform:()=>p,getBrowserInfo:()=>h});var r,o,i,a,s=n(570655),c=n(489588);!function(e){e.WINDOWS="windows",e.MAC="mac",e.ANDROID="android",e.IOS="ios",e.LINUX="linux",e.UNKNOWN="unknown"}(o||(o={})),function(e){e.X86="x86",e.X64="x64",e.ARM="arm"}(i||(i={})),function(e){e.CHROME="chrome",e.FIREFOX="firefox",e.SAFARI="safari",e.OPERA="opera",e.YANDEX="yandex",e.IE="ie",e.EDGE="edge"}(a||(a={}));var l=((r={})[o.ANDROID]=/Android/i,r[o.IOS]=/(iPhone|iPad|iPod)/i,r[o.WINDOWS]=/Win/i,r[o.IOS]=/(iPhone|iPad|iPod)/i,r[o.ANDROID]=/Android/i,r[o.MAC]=/(MacPPC|MacIntel|Mac_PowerPC|Macintosh|Mac OS X)/i,r[o.LINUX]=/(Linux|X11(?!.*CrOS))/i,r),u=/(x86_64|x86-64|win64|x64;|amd64|wow64|x64_64)/i,d=/Mobile|mini|Fennec|Android|iP(ad|od|hone)|opera (mini|mobi)/i,_=new Map,p={get OS(){var e,t;if(_.has("os"))return _.get("os");var n=window.navigator.userAgent;try{for(var r=(0,s.__values)(Object.entries(l)),i=r.next();!i.done;i=r.next()){var a=(0,s.__read)(i.value,2),c=a[0],u=a[1];if(u&&u.test(n))return _.set("os",c),c}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return _.set("os",o.UNKNOWN),o.UNKNOWN},get ARCH(){if(_.has("arch"))return _.get("arch");var e=window.navigator,t=e.userAgent,n=e.platform;return u.test(t)||"MacIntel"===n||"Linux x86_64"===n?(_.set("arch",i.X64),i.X64):/arm/i.test(t)?(_.set("arch",i.ARM),i.ARM):(_.set("arch",i.X86),i.X86)},get BROWSER(){return h().name.toLowerCase()},get isChromeBased(){return h().chromeBased},get isMobile(){if(_.has("isMobile"))return _.get("isMobile");var e=window.navigator.appVersion,t=d.test(e);return _.set("isMobile",t),t},get isIPad(){return c.isIPad||c.isIPadOS}};function h(){if(_.has("browserInfo"))return _.get("browserInfo");var e=function(){var e,t=!1,n=0,r=window.navigator,o=r.userAgent,i=r.appName,s=r.appVersion,c=o.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)([\d.]+)/i)||[];if(/trident/i.test(c[1]))return e=/\brv[ :]+(\d+)([\d.]+)/g.exec(o),{name:a.IE,version:e&&e[1]||"Unknown",fullVersion:e&&e[1]?""+e[1]+(e[2]||""):"Unknown",chromeBased:t,chromeVersion:n};if("Safari"===c[1]){if(e=o.match(/\bEdge\/(\d+)([\d.])+/))return{name:a.EDGE,version:e[1]||"Unknown",fullVersion:e[1]?""+e[1]+(e[2]||""):"Unknown",chromeBased:t,chromeVersion:n};if(e=o.match(/\bCriOS\/(\d+)([\d.]+)/))return{name:a.CHROME,version:e[1],fullVersion:""+e[1]+e[2],chromeBased:!0,chromeVersion:e[1]};if(e=o.match(/\bFxiOS\/(\d+)([\d.]+)/))return{name:a.FIREFOX,version:e[1],fullVersion:""+e[1]+e[2],chromeBased:t,chromeVersion:n};if(e=o.match(/\bYaBrowser\/(\d+)([\d.]+)/))return{name:a.YANDEX,version:e[1],fullVersion:""+e[1]+e[2],chromeBased:t,chromeVersion:n};if(e=o.match(/\bOPT\/(\d+)([\d.]+)/))return{name:a.OPERA,version:e[1],fullVersion:""+e[1]+e[2],chromeBased:t,chromeVersion:n}}if("Chrome"===c[1]){if(n=Number(c[2]),t=!0,e=o.match(/\bOPR\/(\d+)([\d.]+)/))return{name:a.CHROME,version:e[1]||"Unknown",fullVersion:e[1]?""+e[1]+(e[2]||""):"Unknown",chromeBased:t,chromeVersion:n};if(e=o.match(/\bYaBrowser\/(\d+)([\d.]+)/))return{name:a.YANDEX,version:e[1]||"Unknown",fullVersion:e[1]?""+e[1]+(e[2]||""):"Unknown",chromeBased:t,chromeVersion:n};if(e=o.match(/\bEdge?\/(\d+)([\d.]+)/))return{name:a.EDGE,version:e[1]||"Unknown",fullVersion:e[1]?""+e[1]+(e[2]||""):"Unknown",chromeBased:t,chromeVersion:n};if(void 0!==window.opr&&/^(.+\.)?ok.ru$/.test(window.location.host))return{name:a.OPERA,version:"Hidden",fullVersion:"Hidden",chromeBased:t,chromeVersion:n}}return e=o.match(/version\/(\d+)([\d.]+)/i),{name:c[2]?c[1]:i,version:e&&e[1]||c[2]||s,fullVersion:e&&e[1]?""+e[1]+(e[2]||""):c[2]?""+c[2]+(c[3]||""):s,chromeBased:t,chromeVersion:n}}();return _.set("browserInfo",e),e}},363035:(e,t,n)=>{"use strict";var r,o,i,a,s,c;n.d(t,{CallStatReachedType:()=>r,CallStatResult:()=>o,CallStatFailReason:()=>i,CallStatSource:()=>a,CallActionEventType:()=>s,CallStatMuteType:()=>c}),function(e){e.AUDIO="ok_audio",e.AUDIO_TO_VIDEO="ok_video",e.VIDEO="ok_started_as_video",e.GROUP_AUDIO="group_audio",e.GROUP_AUDIO_TO_VIDEO="group_video",e.GROUP_VIDEO="group_started_as_video"}(r||(r={})),function(e){e.SUCCESS="success",e.FAIL="fail"}(o||(o={})),function(e){e.REMOTE_NO_CONNECT="push_not_delivered",e.REMOTE_FAILED_ACCEPT="cant_connect",e.REMOTE_DECLINE="declined_remote",e.LOCAL_DECLINE="declined_local",e.REMOTE_TIMEOUT="declined_timeout",e.REMOTE_BUSY="busy",e.CONNECTION_LOST="lost_connection"}(i||(i={})),function(e){e.CONVO_HEADER="im_header",e.CONVO_SNIPPET="im_message",e.CONVO_LIST="im_create",e.CONVO_JOIN_SNIPPET="im_join_message",e.CONVO_JOIN_HEADER="im_join_header",e.CONVO_JOIN_BANNER="im_join_header",e.FRIENDS_LIST="friends_list",e.LINK_JOIN_SNIPPET="join_deeplink",e.LINK_JOIN_PAGE="join_deeplink",e.PROFILE="profile",e.WIDGET="im_widget",e.FAST_CHAT="fast_chat",e.HISTORY="history",e.HISTORY_FRIENDS_LIST="history_friends_list",e.HISTORY_CREATE="history_create",e.LINK="link"}(a||(a={})),function(e){e.OUTGOING_CALL_STARTED_VIDEO="OutgoingCallStartedVideo",e.OUTGOING_CALL_STARTED_AUDIO="OutgoingCallStartedAudio",e.OUTGOING_CALL_ADD_PARTICIPANTS_SENT="OutgoingCallAddParticipantsSent",e.OUTGOING_CALL_REMOTE_RINGING="OutgoingCallRemoteRinging",e.OUTGOING_CALL_ACCEPTED_REMOTELY="OutgoingCallAcceptedRemotely",e.OUTGOING_CALL_FAILED="OutgoingCallFailed",e.OUTGOING_CALL_COMPLETED="OutgoingCallCompleted",e.INCOMING_CALL_RECEIVED="IncomingCallReceived",e.INCOMING_CALL_ACCEPTED="IncomingCallAccepted",e.CALL_DECLINED_OR_HANGED_LOCALLY="CallDeclinedOrHangedLocally",e.CALL_DECLINED_OR_HANGED_REMOTELY="CallDeclinedOrHangedRemotely",e.CALL_CONNECTED="CallConnected",e.CALL_DISCONNECTED="CallDisconnected",e.VIDEO_ENABLED="VideoEnabled",e.VIDEO_DISABLED="VideoDisabled",e.RELAY_CONNECTION_ESTABLISHED="RelayConnectionEstablished",e.USER_FEEDBACK_RECEIVED="UserFeedbackReceived",e.SYSTEM_STAT="SystemStat",e.GROUP_CALL_JOINED="GroupCallJoined",e.HAND_RAISED="HandRaised",e.HAND_LOWERED="HandLowered",e.SCREEN_SHARING_STARTED="ScreenSharingStarted",e.SCREEN_SHARING_STOPPED="ScreenSharingStopped",e.ALL_MICS_DISABLED="AllMicsDisabled",e.MIC_OFF_WHILE_TALKING_ALERT="MicOffWhileTalkingAlert",e.MIC_OFF_WHILE_TALKING_ENABLE_CLICK="MicOffWhileTalkingEnableClick",e.VIDEO_DISABLED_DUE_TO_BAD_CONNECTION_ALERT="VideoDisabledDueToBadConnectionAlert",e.ALL_MICS_AND_VIDEO_DISABLED="AllMicsAndVideoDisabled",e.USER_MICS_AND_VIDEO_DISABLED="UserMicsAndVideoDisabled",e.ASK_ALL_TO_UNMUTE="AskAllToUnmute",e.ASK_USER_TO_UNMUTE="AskUserToUnmute",e.ASSIGN_ADMIN="AssignAdmin",e.RETRIEVE_ADMIN="RetrieveAdmin",e.ADMIN_PIN="AdminPin",e.ADMIN_UNPIN="AdminUnpin",e.VIRTUAL_BACKGROUND_SELECTED="VirtualBackgroundSelected",e.VIRTUAL_BACKGROUND_DISABLED="VirtualBackgroundDisabled",e.CUSTOM_VIRTUAL_BACKGROUND_SELECTED="CustomVirtualBackgroundSelected",e.CUSTOM_VIRTUAL_BACKGROUND_ADDED="CustomVirtualBackgroundAdded",e.CUSTOM_VIRTUAL_BACKGROUND_DELETED="CustomVirtualBackgroundDeleted",e.CUSTOM_VIRTUAL_BACKGROUND_DISABLED="CustomVirtualBackgroundDisabled"}(s||(s={})),function(e){e[e.ONCE=0]="ONCE",e[e.PERMANENT=1]="PERMANENT"}(c||(c={}))},288420:(e,t,n)=>{"use strict";n.d(t,{default:()=>a});var r=n(570655),o=n(667294),i=n(659397);const a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.appearance,a=e.wide,s=e.overflow,c=e.size,l=(0,r.__rest)(e,["className","appearance","wide","overflow","size"]),u=e.disabled,d=i.classNames.apply(void 0,(0,r.__spreadArray)((0,r.__spreadArray)(["Button"],(0,r.__read)(function(e){return Array.isArray(e)?e.map((function(e){return"Button--"+e})):["Button--"+e]}(n))),["Button--size-"+c,{"Button--wide":a,"Button--overflow":!!s,"Button--disabled":u},t]));return o.createElement("button",(0,r.__assign)({},l,{className:d}),e.children)},t.defaultProps={appearance:"primary",size:"m",wide:!1,disabled:!1},t}(o.Component)},118690:(e,t,n)=>{"use strict";n.d(t,{default:()=>c});var r=n(570655),o=n(667294),i=n(659397),a=n(647560),s=n(288420);const c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.__extends)(t,e),t.prototype.render=function(){var e=this.props,t=e.className,n=e.loading,c=e.children,l=(0,r.__rest)(e,["className","loading","children"]),u=["primary","positive"].some((function(e){return e===l.appearance}));return o.createElement(s.default,(0,r.__assign)({},l,{className:(0,i.classNames)("ButtonWithProgress",{"ButtonWithProgress--loading":n},t)}),o.createElement("span",{className:"ButtonWithProgress__content"},c),n&&o.createElement(a.default,{inverted:u,className:"ButtonWithProgress__progress"}))},t.defaultProps={appearance:"primary",size:"m",wide:!1,disabled:!1,loading:!1},t}(o.Component)},647560:(e,t,n)=>{"use strict";n.d(t,{default:()=>s});var r=n(570655),o=n(667294),i=n(659397),a=function(e){var t=e.inverted,n=e.size,a=e.className,s=(0,r.__rest)(e,["inverted","size","className"]),c=(0,i.classNames)("Progress",{"Progress--inverted":!!t},"Progress--size-"+n,a);return o.createElement("div",(0,r.__assign)({className:c},s),o.createElement("div",{className:"Progress__item"}),o.createElement("div",{className:"Progress__item"}),o.createElement("div",{className:"Progress__item"}))};a.defaultProps={inverted:!1,size:"s"};const s=a},570655:(e,t,n)=>{"use strict";n.d(t,{__extends:()=>o,__assign:()=>i,__rest:()=>a,__awaiter:()=>s,__generator:()=>c,__values:()=>l,__read:()=>u,__spreadArray:()=>d,__asyncValues:()=>_,__makeTemplateObject:()=>p});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function l(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function d(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||t)}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=l(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function p(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create},45327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},685217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},171171:(e,t,n)=>{var r=n(685217),o=n(45327);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}},545580:(e,t,n)=>{"use strict";n.d(t,{default:()=>r});const r=(0,n(640447).adapterFactory)({window:"undefined"==typeof window?void 0:window})},640447:(e,t,n)=>{"use strict";n.d(t,{adapterFactory:()=>u});var r=n(786643),o=n(165070),i=n(624854),a=n(960057),s=n(809080),c=n(155938),l=n(548864);function u({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0}){const n=r.log,u=r.detectBrowser(e),d={browserDetails:u,commonShim:l,extractVersion:r.extractVersion,disableLog:r.disableLog,disableWarnings:r.disableWarnings};switch(u.browser){case"chrome":if(!o||!o.shimPeerConnection||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),d;if(null===u.version)return n("Chrome shim can not determine version, not shimming."),d;n("adapter.js shimming chrome."),d.browserShim=o,o.shimGetUserMedia(e),o.shimMediaStream(e),o.shimPeerConnection(e),o.shimOnTrack(e),o.shimAddTrackRemoveTrack(e),o.shimGetSendersWithDtmf(e),o.shimGetStats(e),o.shimSenderReceiverGetStats(e),o.fixNegotiationNeeded(e),l.shimRTCIceCandidate(e),l.shimConnectionState(e),l.shimMaxMessageSize(e),l.shimSendThrowTypeError(e),l.removeAllowExtmapMixed(e);break;case"firefox":if(!a||!a.shimPeerConnection||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),d;n("adapter.js shimming firefox."),d.browserShim=a,s.shimGetUserMedia(e),a.shimPeerConnection(e),a.shimOnTrack(e),a.shimRemoveStream(e),a.shimSenderGetStats(e),a.shimReceiverGetStats(e),a.shimRTCDataChannel(e),a.shimAddTransceiver(e),a.shimGetParameters(e),a.shimCreateOffer(e),a.shimCreateAnswer(e),l.shimRTCIceCandidate(e),l.shimConnectionState(e),l.shimMaxMessageSize(e),l.shimSendThrowTypeError(e);break;case"edge":if(!i||!i.shimPeerConnection||!t.shimEdge)return n("MS edge shim is not included in this adapter release."),d;n("adapter.js shimming edge."),d.browserShim=i,i.shimGetUserMedia(e),i.shimGetDisplayMedia(e),i.shimPeerConnection(e),i.shimReplaceTrack(e),l.shimMaxMessageSize(e),l.shimSendThrowTypeError(e);break;case"safari":if(!c||!t.shimSafari)return n("Safari shim is not included in this adapter release."),d;n("adapter.js shimming safari."),d.browserShim=c,c.shimRTCIceServerUrls(e),c.shimCreateOfferLegacy(e),c.shimCallbacksAPI(e),c.shimLocalStreamsAPI(e),c.shimRemoteStreamsAPI(e),c.shimTrackEventTransceiver(e),c.shimGetUserMedia(e),c.shimAudioContext(e),l.shimRTCIceCandidate(e),l.shimMaxMessageSize(e),l.shimSendThrowTypeError(e),l.removeAllowExtmapMixed(e);break;default:n("Unsupported browser!")}return d}},165070:(e,t,n)=>{"use strict";n.r(t),n.d(t,{shimGetUserMedia:()=>o.shimGetUserMedia,shimGetDisplayMedia:()=>i.shimGetDisplayMedia,shimMediaStream:()=>a,shimOnTrack:()=>s,shimGetSendersWithDtmf:()=>c,shimGetStats:()=>l,shimSenderReceiverGetStats:()=>u,shimAddTrackRemoveTrackWithNative:()=>d,shimAddTrackRemoveTrack:()=>_,shimPeerConnection:()=>p,fixNegotiationNeeded:()=>h});var r=n(786643),o=n(480009),i=n(271533);function a(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function s(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===n.track.id)):{track:n.track};const o=new Event("track");o.track=n.track,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)})),t.stream.getTracks().forEach((n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===n.id)):{track:n};const o=new Event("track");o.track=n,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else r.wrapPeerConnectionEvent(e,"track",(e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e)))}function c(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let o=n.apply(this,arguments);return o||(o=t(this,e),this._senders.push(o)),o};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach((e=>{this._senders.push(t(this,e))}))};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach((e=>{const t=this._senders.find((t=>t.track===e));t&&this._senders.splice(this._senders.indexOf(t),1)}))}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function l(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,n,r]=arguments;if(arguments.length>0&&"function"==typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof e))return t.apply(this,[]);const o=function(e){const t={};return e.result().forEach((e=>{const n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((t=>{n[t]=e.stat(t)})),t[n.id]=n})),t},i=function(e){return new Map(Object.keys(e).map((t=>[t,e[t]])))};if(arguments.length>=2){const r=function(e){n(i(o(e)))};return t.apply(this,[r,e])}return new Promise(((e,n)=>{t.apply(this,[function(t){e(i(o(t)))},n])})).then(n,r)}}function u(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>r.filterStats(t,e.track,!0)))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),r.wrapPeerConnectionEvent(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>r.filterStats(t,e.track,!1)))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach((n=>{n.track===e&&(t?r=!0:t=n)})),this.getReceivers().forEach((t=>(t.track===e&&(n?r=!0:n=t),t.track===e))),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function d(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((e=>this._shimmedLocalStreams[e][0]))};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")}));const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter((e=>-1===t.indexOf(e)));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]})),o.apply(this,arguments)}}function _(e){if(!e.RTCPeerConnection)return;const t=r.detectBrowser(e);if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return d(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map((e=>this._reverseStreams[e.id]))};const o=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}o.apply(this,[t])};const i=e.RTCPeerConnection.prototype.removeStream;function a(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(o.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}function s(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),o.id)})),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},i.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find((e=>e===t)))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");const o=this.getSenders().find((e=>e.track===t));if(o)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const i=this._streams[n.id];if(i)i.addTrack(t),Promise.resolve().then((()=>{this.dispatchEvent(new Event("negotiationneeded"))}));else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find((e=>e.track===t))},["createOffer","createAnswer"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?n.apply(this,[t=>{const n=a(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then((e=>a(this,e)))}};e.RTCPeerConnection.prototype[t]=r[t]}));const c=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=s(this,arguments[0]),c.apply(this,arguments)):c.apply(this,arguments)};const l=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=l.get.apply(this);return""===e.type?e:a(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach((n=>{this._streams[n].getTracks().find((t=>e.track===t))&&(t=this._streams[n])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function p(e){const t=r.detectBrowser(e);if(!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),!e.RTCPeerConnection)return;const n=0===e.RTCPeerConnection.prototype.addIceCandidate.length;t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}));const o=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return n||arguments[0]?t.version<78&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():o.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}function h(e){const t=r.detectBrowser(e);r.wrapPeerConnectionEvent(e,"negotiationneeded",(e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e}))}},271533:(e,t,n)=>{"use strict";function r(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((t=>{const r=n.video&&n.video.width,o=n.video&&n.video.height,i=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:i||3}},r&&(n.video.mandatory.maxWidth=r),o&&(n.video.mandatory.maxHeight=o),e.navigator.mediaDevices.getUserMedia(n)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}n.d(t,{shimGetDisplayMedia:()=>r})},480009:(e,t,n)=>{"use strict";n.d(t,{shimGetUserMedia:()=>i});var r=n(786643);const o=r.log;function i(e){const t=e&&e.navigator;if(!t.mediaDevices)return;const n=r.detectBrowser(e),i=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach((n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"==typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);const o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"==typeof r.ideal?(e[o("min",n)]=r.ideal,t.optional.push(e),e={},e[o("max",n)]=r.ideal,t.optional.push(e)):(e[o("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!=typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach((e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])}))})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},a=function(e,r){if(n.version>=61)return r(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=i(e.audio)}if(e&&"object"==typeof e.video){let a=e.video.facingMode;a=a&&("object"==typeof a?a:{ideal:a});const s=n.version<66;if(a&&("user"===a.exact||"environment"===a.exact||"user"===a.ideal||"environment"===a.ideal)&&(!t.mediaDevices.getSupportedConstraints||!t.mediaDevices.getSupportedConstraints().facingMode||s)){let n;if(delete e.video.facingMode,"environment"===a.exact||"environment"===a.ideal?n=["back","rear"]:"user"!==a.exact&&"user"!==a.ideal||(n=["front"]),n)return t.mediaDevices.enumerateDevices().then((t=>{let s=(t=t.filter((e=>"videoinput"===e.kind))).find((e=>n.some((t=>e.label.toLowerCase().includes(t)))));return!s&&t.length&&n.includes("back")&&(s=t[t.length-1]),s&&(e.video.deviceId=a.exact?{exact:s.deviceId}:{ideal:s.deviceId}),e.video=i(e.video),o("chrome: "+JSON.stringify(e)),r(e)}))}e.video=i(e.video)}return o("chrome: "+JSON.stringify(e)),r(e)},s=function(e){return n.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(t.getUserMedia=function(e,n,r){a(e,(e=>{t.webkitGetUserMedia(e,n,(e=>{r&&r(s(e))}))}))}.bind(t),t.mediaDevices.getUserMedia){const e=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(t){return a(t,(t=>e(t).then((e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((e=>{e.stop()})),new DOMException("","NotFoundError");return e}),(e=>Promise.reject(s(e))))))}}}},548864:(e,t,n)=>{"use strict";n.r(t),n.d(t,{shimRTCIceCandidate:()=>a,shimMaxMessageSize:()=>s,shimSendThrowTypeError:()=>c,shimConnectionState:()=>l,removeAllowExtmapMixed:()=>u});var r=n(857539),o=n.n(r),i=n(786643);function a(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){const n=new t(e),r=o().parseCandidate(e.candidate),i=Object.assign(n,r);return i.toJSON=function(){return{candidate:i.candidate,sdpMid:i.sdpMid,sdpMLineIndex:i.sdpMLineIndex,usernameFragment:i.usernameFragment}},i}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,i.wrapPeerConnectionEvent(e,"icecandidate",(t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t)))}function s(e){if(!e.RTCPeerConnection)return;const t=i.detectBrowser(e);"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const n=function(e){if(!e||!e.sdp)return!1;const t=o().splitSections(e.sdp);return t.shift(),t.some((e=>{const t=o().parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))},r=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!=n?-1:n},a=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n},s=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const i=o().matchPrefix(e.sdp,"a=max-message-size:");return i.length>0?r=parseInt(i[0].substr(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r},c=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(n(arguments[0])){const e=r(arguments[0]),t=a(e),n=s(arguments[0],e);let o;o=0===t&&0===n?Number.POSITIVE_INFINITY:0===t||0===n?Math.max(t,n):Math.min(t,n);const i={};Object.defineProperty(i,"maxMessageSize",{get:()=>o}),this._sctp=i}return c.apply(this,arguments)}}function c(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],o=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&o>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},i.wrapPeerConnectionEvent(e,"datachannel",(e=>(t(e.channel,e.target),e)))}function l(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}function u(e){if(!e.RTCPeerConnection)return;const t=i.detectBrowser(e);if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(e){return e&&e.sdp&&-1!==e.sdp.indexOf("\na=extmap-allow-mixed")&&(e.sdp=e.sdp.split("\n").filter((e=>"a=extmap-allow-mixed"!==e.trim())).join("\n")),n.apply(this,arguments)}}},624854:(e,t,n)=>{"use strict";n.r(t),n.d(t,{shimGetUserMedia:()=>s.shimGetUserMedia,shimGetDisplayMedia:()=>c.shimGetDisplayMedia,shimPeerConnection:()=>l,shimReplaceTrack:()=>u});var r=n(786643),o=n(860641),i=n(762539),a=n.n(i),s=n(131169),c=n(794155);function l(e){const t=r.detectBrowser(e);if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){const t=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set(e){t.set.call(this,e);const n=new Event("enabled");n.enabled=e,this.dispatchEvent(n)}})}e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)&&Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new e.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),e.RTCDtmfSender&&!e.RTCDTMFSender&&(e.RTCDTMFSender=e.RTCDtmfSender);const n=a()(e,t.version);e.RTCPeerConnection=function(e){return e&&e.iceServers&&(e.iceServers=(0,o.filterIceServers)(e.iceServers,t.version),r.log("ICE servers after filtering:",e.iceServers)),new n(e)},e.RTCPeerConnection.prototype=n.prototype}function u(e){e.RTCRtpSender&&!("replaceTrack"in e.RTCRtpSender.prototype)&&(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}},860641:(e,t,n)=>{"use strict";n.d(t,{filterIceServers:()=>o});var r=n(786643);function o(e,t){let n=!1;return(e=JSON.parse(JSON.stringify(e))).filter((e=>{if(e&&(e.urls||e.url)){let t=e.urls||e.url;e.url&&!e.urls&&r.deprecated("RTCIceServer.url","RTCIceServer.urls");const o="string"==typeof t;return o&&(t=[t]),t=t.filter((e=>{if(0===e.indexOf("stun:"))return!1;const t=e.startsWith("turn")&&!e.startsWith("turn:[")&&e.includes("transport=udp");return t&&!n?(n=!0,!0):t&&!n})),delete e.url,e.urls=o?t[0]:t,!!t.length}}))}},794155:(e,t,n)=>{"use strict";function r(e){"getDisplayMedia"in e.navigator&&e.navigator.mediaDevices&&(e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||(e.navigator.mediaDevices.getDisplayMedia=e.navigator.getDisplayMedia.bind(e.navigator)))}n.d(t,{shimGetDisplayMedia:()=>r})},131169:(e,t,n)=>{"use strict";function r(e){const t=e&&e.navigator,n=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return n(e).catch((e=>Promise.reject(function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString(){return this.name}}}(e))))}}n.d(t,{shimGetUserMedia:()=>r})},960057:(e,t,n)=>{"use strict";n.r(t),n.d(t,{shimGetUserMedia:()=>o.shimGetUserMedia,shimGetDisplayMedia:()=>i.shimGetDisplayMedia,shimOnTrack:()=>a,shimPeerConnection:()=>s,shimSenderGetStats:()=>c,shimReceiverGetStats:()=>l,shimRemoveStream:()=>u,shimRTCDataChannel:()=>d,shimAddTransceiver:()=>_,shimGetParameters:()=>p,shimCreateOffer:()=>h,shimCreateAnswer:()=>f});var r=n(786643),o=n(809080),i=n(72365);function a(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function s(e){const t=r.detectBrowser(e);if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;if(!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]})),t.version<68){const t=e.RTCPeerConnection.prototype.addIceCandidate;e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():t.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},o=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,r,i]=arguments;return o.apply(this,[e||null]).then((e=>{if(t.version<53&&!r)try{e.forEach((e=>{e.type=n[e.type]||e.type}))}catch(t){if("TypeError"!==t.name)throw t;e.forEach(((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(r,i)}}function c(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function l(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),r.wrapPeerConnectionEvent(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function u(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){r.deprecated("removeStream","removeTrack"),this.getSenders().forEach((t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)}))})}function d(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function _(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];const e=arguments[1],n=e&&"sendEncodings"in e;n&&e.sendEncodings.forEach((e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e.sendEncodings,t.sendEncodings=e.sendEncodings,this.setParametersPromises.push(t.setParameters(n).then((()=>{delete t.sendEncodings})).catch((()=>{delete t.sendEncodings}))))}return r})}function p(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function h(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function f(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}},72365:(e,t,n)=>{"use strict";function r(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}n.d(t,{shimGetDisplayMedia:()=>r})},809080:(e,t,n)=>{"use strict";n.d(t,{shimGetUserMedia:()=>o});var r=n(786643);function o(e){const t=r.detectBrowser(e),n=e&&e.navigator,o=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,o){r.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,o)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"==typeof n&&"object"==typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},o&&o.prototype.getSettings){const t=o.prototype.getSettings;o.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(o&&o.prototype.applyConstraints){const t=o.prototype.applyConstraints;o.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"==typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}},155938:(e,t,n)=>{"use strict";n.r(t),n.d(t,{shimLocalStreamsAPI:()=>o,shimRemoteStreamsAPI:()=>i,shimCallbacksAPI:()=>a,shimGetUserMedia:()=>s,shimConstraints:()=>c,shimRTCIceServerUrls:()=>l,shimTrackEventTransceiver:()=>u,shimCreateOfferLegacy:()=>d,shimAudioContext:()=>_});var r=n(786643);function o(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((n=>t.call(this,n,e))),e.getVideoTracks().forEach((n=>t.call(this,n,e)))},e.RTCPeerConnection.prototype.addTrack=function(e,...n){return n&&n.forEach((e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach((e=>{n.includes(e.track)&&this.removeTrack(e)}))})}}function i(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach((e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)}))})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}))}),t.apply(e,arguments)}}}function a(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,a=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],o=n.apply(this,[r]);return t?(o.then(e,t),Promise.resolve()):o},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[n]);return t?(o.then(e,t),Promise.resolve()):o};let s=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=s,s=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=s,s=function(e,t,n){const r=a.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=s}function s(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(c(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function c(e){return e&&void 0!==e.video?Object.assign({},e,{video:r.compactObject(e.video)}):e}function l(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;n<e.iceServers.length;n++){let o=e.iceServers[n];!o.hasOwnProperty("urls")&&o.hasOwnProperty("url")?(r.deprecated("RTCIceServer.url","RTCIceServer.urls"),o=JSON.parse(JSON.stringify(o)),o.urls=o.url,delete o.url,t.push(o)):t.push(e.iceServers[n])}e.iceServers=t}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function u(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function d(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find((e=>"audio"===e.receiver.track.kind));!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio"),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find((e=>"video"===e.receiver.track.kind));!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video")}return t.apply(this,arguments)}}function _(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}},786643:(e,t,n)=>{"use strict";n.d(t,{extractVersion:()=>i,wrapPeerConnectionEvent:()=>a,disableLog:()=>s,disableWarnings:()=>c,log:()=>l,deprecated:()=>u,detectBrowser:()=>d,compactObject:()=>p,filterStats:()=>f});let r=!0,o=!0;function i(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function a(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return o.apply(this,arguments);const i=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,i),o.apply(this,[e,i])};const i=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(n))return i.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,i.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function s(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(r=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function c(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(o=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function l(){if("object"==typeof window){if(r)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function u(e,t){o&&console.warn(e+" is deprecated, please use "+t+" instead.")}function d(e){const t={browser:null,version:null};if(void 0===e||!e.navigator)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.mozGetUserMedia)t.browser="firefox",t.version=i(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection&&!e.RTCIceGatherer)t.browser="chrome",t.version=i(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(n.mediaDevices&&n.userAgent.match(/Edge\/(\d+).(\d+)$/))t.browser="edge",t.version=i(n.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=i(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}function p(e){return _(e)?Object.keys(e).reduce((function(t,n){const r=_(e[n]),o=r?p(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,{[n]:o})}),{}):e}function h(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((r=>{r.endsWith("Id")?h(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((t=>{h(e,e.get(t),n)}))})))}function f(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(null===t)return o;const i=[];return e.forEach((e=>{"track"===e.type&&e.trackIdentifier===t.id&&i.push(e)})),i.forEach((t=>{e.forEach((n=>{n.type===r&&n.trackId===t.id&&h(e,n,o)}))})),o}},194795:function(e,t,n){var r;!function(t){"use strict";function o(){}var i=o.prototype,a=t.EventEmitter;function s(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function c(e){return function(){return this[e].apply(this,arguments)}}function l(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&l(e.listener)}i.getListeners=function(e){var t,n,r=this._getEvents();if(e instanceof RegExp)for(n in t={},r)r.hasOwnProperty(n)&&e.test(n)&&(t[n]=r[n]);else t=r[e]||(r[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},i.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},i.addListener=function(e,t){if(!l(t))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(e),o="object"==typeof t;for(n in r)r.hasOwnProperty(n)&&-1===s(r[n],t)&&r[n].push(o?t:{listener:t,once:!1});return this},i.on=c("addListener"),i.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},i.once=c("addOnceListener"),i.defineEvent=function(e){return this.getListeners(e),this},i.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},i.removeListener=function(e,t){var n,r,o=this.getListenersAsObject(e);for(r in o)o.hasOwnProperty(r)&&-1!==(n=s(o[r],t))&&o[r].splice(n,1);return this},i.off=c("removeListener"),i.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},i.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},i.manipulateListeners=function(e,t,n){var r,o,i=e?this.removeListener:this.addListener,a=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(r=n.length;r--;)i.call(this,t,n[r]);else for(r in t)t.hasOwnProperty(r)&&(o=t[r])&&("function"==typeof o?i.call(this,r,o):a.call(this,r,o));return this},i.removeEvent=function(e){var t,n=typeof e,r=this._getEvents();if("string"===n)delete r[e];else if(e instanceof RegExp)for(t in r)r.hasOwnProperty(t)&&e.test(t)&&delete r[t];else delete this._events;return this},i.removeAllListeners=c("removeEvent"),i.emitEvent=function(e,t){var n,r,o,i,a=this.getListenersAsObject(e);for(i in a)if(a.hasOwnProperty(i))for(n=a[i].slice(0),o=0;o<n.length;o++)!0===(r=n[o]).once&&this.removeListener(e,r.listener),r.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,r.listener);return this},i.trigger=c("emitEvent"),i.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},i.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},i._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},i._getEvents=function(){return this._events||(this._events={})},o.noConflict=function(){return t.EventEmitter=a,o},void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}("undefined"!=typeof window?window:this||{})}}]);try{stManager.done("dist/common.9b49b8bbd5c7f005a6d8.js")}catch(e){}